Skip to content

Check List Item

brandonk1234 edited this page Feb 23, 2017 · 4 revisions

CheckListItem

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.

Props

The props needed for this component are listed and explained below:

  • isChecked - This prop must be a boolean

  • onCheck - This prop must be a function

Example

<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);
},
 

Related