Skip to content

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

@geekingfrog

Description

@geekingfrog

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: buttonChanges related to the button.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions