-
Notifications
You must be signed in to change notification settings - Fork 2
Check List Item
brandonk1234 edited this page Feb 23, 2017
·
4 revisions
The check list item component is used when you want your list of items to be checkable and have a check box on the side of it.
The props needed for this component are listed and explained below:
-
isChecked
- This prop must be aboolean
-
onCheck
- This prop must be afunction
<CheckListItem
isChecked={this.state.isChecked}
onCheck={this.onCheck}>
<div>
Check List Item
</div>
</CheckListItem>
//...React Component
getInitialState: function() {
return {
isChecked: false
}
},
onCheck: function() {
console.log(""This button has been clicked);
},