Created
March 24, 2017 20:21
-
-
Save malonehedges/a312fb5ba48861522b00807b1eff9f6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* ListItemCheckbox | |
* | |
*/ | |
import React from 'react' | |
import { ListItem } from 'material-ui/List' | |
import Checkbox from 'material-ui/Checkbox' | |
function ListItemCheckbox(props) { | |
const { | |
checked, | |
onCheck, | |
primaryText, | |
secondaryText, | |
} = props | |
return ( | |
<div | |
onTouchTap={onCheck} | |
> | |
<ListItem | |
leftCheckbox={ | |
<Checkbox | |
checked={checked} | |
onTouchTap={onCheck} | |
/> | |
} | |
onTouchTap={onCheck} | |
disabled={false} | |
primaryText={primaryText} | |
secondaryText={secondaryText} | |
/> | |
</div> | |
) | |
} | |
ListItemCheckbox.propTypes = { | |
checked: React.PropTypes.bool.isRequired, | |
onCheck: React.PropTypes.func.isRequired, | |
primaryText: React.PropTypes.string, | |
secondaryText: React.PropTypes.string, | |
} | |
export default ListItemCheckbox |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment