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

Button's support for this.props.children? #189

Closed
geekingfrog opened this issue Jan 4, 2015 · 3 comments
Closed

Button's support for this.props.children? #189

geekingfrog opened this issue Jan 4, 2015 · 3 comments
Labels
component: button This is the name of the generic UI component, not the React module!

Comments

@geekingfrog
Copy link
Contributor

I'd like to be able to customize some button content with complex elements, where a label is not enough.
The component icon button is also not suitable since it's rounded.
What I'd like would be something like:

<FlatButton>
  <Icon icon='action-alarm-on'/> wake up!
</FlatButton>

This can be done easily by replacing this line with

<span className="mui-flat-button-label">{label || this.props.children}</span>

and making the property label optional.

What do you guys think?

@geekingfrog
Copy link
Contributor Author

Any ETA for this? I'll be glad to help and add a pull request if you need it.

@hai-cea
Copy link
Member

hai-cea commented Jan 14, 2015

I think we should make an icon prop instead of using this.props.children?

This would be in line with how IconButton is set up:
http://material-ui.com/#/components/icon-buttons

@hai-cea
Copy link
Member

hai-cea commented Feb 11, 2015

Fixed with #323

@hai-cea hai-cea closed this as completed Feb 11, 2015
@oliviertassinari oliviertassinari added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 25, 2022
@zannager zannager added component: button This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: button This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

4 participants