Skip to content

Commit

Permalink
Merge pull request #123 from arlen-yu/master
Browse files Browse the repository at this point in the history
Allow defaultChecked to be string as well as boolean
  • Loading branch information
gabrielbull committed May 2, 2018
2 parents ba86cf0 + 1b5e0ed commit 4871cad
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Checkbox/macOs/index.js
Expand Up @@ -22,7 +22,7 @@ class Checkbox extends Component {
constructor(props) {
super();
this.state = {
checked: props.defaultChecked === true,
checked: !!props.defaultChecked === true,
transition: true
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/Checkbox/windows/index.js
Expand Up @@ -29,7 +29,7 @@ class Checkbox extends Component {
constructor(props) {
super();
this.state = {
checked: props.defaultChecked === true
checked: !!props.defaultChecked === true
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/Radio/macOs/index.js
Expand Up @@ -22,7 +22,7 @@ class Radio extends Component {
constructor(props) {
super();
this.state = {
checked: props.defaultChecked === true,
checked: !!props.defaultChecked === true,
transition: true
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/Radio/windows/index.js
Expand Up @@ -38,7 +38,7 @@ class Radio extends Component {
constructor(props) {
super();
this.state = {
checked: props.defaultChecked === true
checked: !!props.defaultChecked === true
};
}

Expand Down

0 comments on commit 4871cad

Please sign in to comment.