Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dialog] title loses style when it's and element instead of a string #3373

Closed
antoinerousseau opened this issue Feb 18, 2016 · 2 comments · Fixed by #4033
Closed

[Dialog] title loses style when it's and element instead of a string #3373

antoinerousseau opened this issue Feb 18, 2016 · 2 comments · Fixed by #4033
Labels
component: dialog This is the name of the generic UI component, not the React module!

Comments

@antoinerousseau
Copy link
Contributor

<Dialog title={<FormattedMessage id="dialog.title" />} open={true}>
  blabla
</Dialog>

In this case the style is not applied on the title:

capture d ecran 2016-02-17 18 52 47

@oliviertassinari
Copy link
Member

Yeah, we just render the node if it's not a string: https://github.com/callemall/material-ui/blob/master/src/dialog.jsx#L339. I guess cloning the element to add the style sounds like a good idea.

@oliviertassinari oliviertassinari changed the title Dialog title loses style when it's and element instead of a string [Dialog] title loses style when it's and element instead of a string Feb 18, 2016
echenley pushed a commit to echenley/material-ui that referenced this issue Apr 24, 2016
commit 70ae018
Merge: 3b640c8 713dc4c
Author: Evan Henley <[email protected]>
Date:   Sun Apr 24 15:16:17 2016 -0500

    Merge branch 'master' of github.com:callemall/material-ui

commit 713dc4c
Merge: 390108d 3d89a9d
Author: Nathan <[email protected]>
Date:   Sat Apr 23 19:20:03 2016 -0400

    Merge pull request mui#4026 from oliviertassinari/circular-progress-fix

    [CircularProgress] Fix for Android

commit 390108d
Merge: 252bc5c 5a5d28d
Author: Nathan <[email protected]>
Date:   Fri Apr 22 23:47:24 2016 -0400

    Merge pull request mui#4069 from scarletsky/improve-codemod

    [codemod] Improve the path migration

commit 5a5d28d
Author: scarletsky <[email protected]>
Date:   Fri Apr 22 22:47:51 2016 +0800

    [Codemod] Improve the path migration

commit 252bc5c
Merge: 12a6d6a ea6e7a9
Author: Nathan <[email protected]>
Date:   Fri Apr 22 17:57:19 2016 -0400

    Merge pull request mui#4074 from oliviertassinari/eslint-format-js

    [eslint] Use the js format instead of the yaml one

commit ea6e7a9
Author: Olivier Tassinari <[email protected]>
Date:   Fri Apr 22 23:33:32 2016 +0200

    [eslint] Use the js format intead of the yaml one

commit 12a6d6a
Merge: e655bf9 8bdbdc8
Author: Nathan <[email protected]>
Date:   Fri Apr 22 17:36:46 2016 -0400

    Merge pull request mui#4073 from oliviertassinari/proptypes-remove-spaces

    [Core] Remove the blank line between the propTypes definitions

commit 8bdbdc8
Author: Olivier Tassinari <[email protected]>
Date:   Fri Apr 22 23:01:52 2016 +0200

    [Core] Remove the blank line between the propTypes definitions

commit e655bf9
Merge: 88fb46d 5c9fd41
Author: Nathan <[email protected]>
Date:   Fri Apr 22 16:50:06 2016 -0400

    Merge pull request mui#4072 from oliviertassinari/docs-webpack-undefined-host

    [Docs] Set a falsy host so we can access the docs from a remote ip

commit 5c9fd41
Author: Olivier Tassinari <[email protected]>
Date:   Fri Apr 22 22:29:38 2016 +0200

    [Docs] Set a falsy host so we can access the docs from a remote ip

commit 88fb46d
Merge: 051fbc2 a76c088
Author: Olivier Tassinari <[email protected]>
Date:   Fri Apr 22 21:38:27 2016 +0200

    Merge pull request mui#4058 from mbrookes/named-imports

    [Core] Used named imports for createClass, Component & PropTypes

commit 051fbc2
Merge: 7cf7adf bb51006
Author: Nathan <[email protected]>
Date:   Thu Apr 21 19:09:13 2016 -0400

    [Docs] Add v0.15.0-beta.2 to versions.json

    [Docs] Add v0.15.0-beta.2 to versions.json

commit bb51006
Author: Nathan Marks <[email protected]>
Date:   Thu Apr 21 19:06:03 2016 -0400

    Add v0.15.0-beta.2 to versions.json

commit 7cf7adf
Merge: 1890ad1 7f61d11
Author: Nathan <[email protected]>
Date:   Thu Apr 21 18:57:41 2016 -0400

    Merge pull request mui#4060 from alitaheri/prepare-0.15.0-beta.2-release

    Prepare the 0.15.0-beta.2 release

commit 7f61d11
Author: Ali Taheri <[email protected]>
Date:   Thu Apr 21 23:55:05 2016 +0430

    Prepare the 0.15.0-beta.2 release

commit 1890ad1
Merge: acbbdbc 858dcaf
Author: Neil Gabbadon <[email protected]>
Date:   Thu Apr 21 14:40:35 2016 -0400

    Merge pull request mui#4035 from nathanmarks/raisedbutton-hover-icon

    [RaisedButton] fix hover overlay for icon only buttons, fixes mui#3815

commit acbbdbc
Merge: 9baaf7e efc62fd
Author: Olivier Tassinari <[email protected]>
Date:   Thu Apr 21 20:39:01 2016 +0200

    Merge pull request mui#4057 from dugokontov/remove-link-to-localhost

    [Docs] Remove localhost:3000 from link

commit 9baaf7e
Merge: be3615f 86b5894
Author: Olivier Tassinari <[email protected]>
Date:   Thu Apr 21 20:37:24 2016 +0200

    Merge pull request mui#4033 from antoinerousseau/dialog-title-style

    [Dialog] Merge title style when title it a node

commit a76c088
Author: mbrookes <[email protected]>
Date:   Thu Apr 21 07:27:21 2016 -0700

    [Core] Used named imports for createClass, Component & PropTypes

commit efc62fd
Author: Sergej Dugokontov <[email protected]>
Date:   Thu Apr 21 13:50:45 2016 +0200

    [Docs] Remove localhost:3000 from link

commit 86b5894
Author: Antoine Rousseau <[email protected]>
Date:   Mon Apr 18 19:11:36 2016 -0500

    [Dialog] merge title style when it's a node, fixes mui#3373

commit be3615f
Merge: 8cdf8a8 c816c89
Author: Matt Brookes <[email protected]>
Date:   Wed Apr 20 13:13:41 2016 -0700

    Merge pull request mui#4048 from nathanmarks/readme-beta-installation

    [Docs] Add beta installation details to the README

commit 8cdf8a8
Merge: b266f34 c71f1b2
Author: Olivier Tassinari <[email protected]>
Date:   Wed Apr 20 21:19:04 2016 +0200

    Merge pull request mui#4044 from nathanmarks/checkbox-style-fix

    [ListItem] Add extra width to leftCheckbox for EnhancedSwitch margin, fixes mui#4016

commit c71f1b2
Author: Nathan Marks <[email protected]>
Date:   Wed Apr 20 00:27:44 2016 -0400

    [ListItem] Add extra width to leftCheckbox for EnhancedSwitch margin

    Fixes mui#4016

commit c816c89
Author: Nathan Marks <[email protected]>
Date:   Wed Apr 20 09:05:45 2016 -0400

    [Docs] Add beta installation details to the README

    Adds instructions for installing the @next npm package to the README. Also removed an incorrect line from the installation instructions.

commit 858dcaf
Author: Nathan Marks <[email protected]>
Date:   Tue Apr 19 00:13:16 2016 -0400

    [RaisedButton] Add browser for mui#3815 and a couple of starting unit tests

commit ceda73d
Author: Nathan Marks <[email protected]>
Date:   Mon Apr 18 21:29:33 2016 -0400

    [RaisedButton] Add explicit height property to overlay, fixes mui#3815

commit 3d89a9d
Author: Olivier Tassinari <[email protected]>
Date:   Sun Apr 17 23:09:56 2016 +0200

    [CircularProgress] Fix for Android
tintin1343 pushed a commit to tintin1343/material-ui that referenced this issue Apr 25, 2016
und3fined pushed a commit to und3fined/material-ui that referenced this issue May 17, 2016
@n-sviridenko
Copy link

It's a bad idea because when you use internationalisation components like <FormattedMessage /> from react-intl it breaks the header. I think, better is provide the titleElement property like in AppBar for left and right icons. What others think about it?

@zannager zannager added the component: dialog This is the name of the generic UI component, not the React module! label Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: dialog This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants