-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
Allow customising RadioButton icons #1639
Conversation
b27eea5
to
1f60ff0
Compare
…hen you have input background hint can not see it.
…hen you have input background hint can not see it.
…hen you have input background hint can not see it.
@@ -87,10 +91,22 @@ let RadioButton = React.createClass({ | |||
this.props.iconStyle, | |||
this.props.disabled && styles.fillWhenDisabled); | |||
|
|||
let checkedElement = checkedIcon ? React.cloneElement(checkedIcon, { | |||
style: this.mergeAndPrefix(onStyles, checkedIcon.props.style), | |||
}) : React.createElement(RadioButtonOn, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you keep the JSX syntax?
You will have to rebase. |
@@ -15,9 +15,11 @@ let RadioButton = React.createClass({ | |||
}, | |||
|
|||
propTypes: { | |||
checkedIcon: React.PropTypes.element, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we should use node
that is less restrictive.
Could you add this to the documentation?
Hi @danni, I'd like to merge this PR. Do you think you might be able to do the last bits of tidying up per @oliviertassinari's comments? I can take care of the docs separately. |
Being continued here: #3285 |
This is used the same way as for Checkbox.