-
Notifications
You must be signed in to change notification settings - Fork 4.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
Classes & Props: Checkbox #32
Conversation
@@ -19,8 +19,9 @@ import $ from 'jquery'; | |||
* <Checkbox type='toggle' /> | |||
*/ | |||
@radium | |||
class Checkbox extends Component { | |||
export default class Checkbox extends Component { |
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.
Export inline, instead of at the end of the file.
<div className={classes} style={this.props.style} ref='container'> | ||
<input defaultChecked={this.props.defaultChecked} type='checkbox' name={name} ref='checkbox' /> | ||
<div className={classes} ref='container'> | ||
<input {...checkboxProps} ref='checkbox' /> |
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.
Only spread non class props, since classes belong on the containing div.
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.
nifty, will we plan to implement this with every stardust component?
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.
haha this way cleaner than trying to determine whether or not it's a className >.< +1
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.
@athurman yep, every component is getting this update.
Looks good! 🌊 🐙 |
🍂 |
No description provided.