Skip to content

Instantly share code, notes, and snippets.

@malonehedges
Created March 24, 2017 20:21
Show Gist options
  • Save malonehedges/a312fb5ba48861522b00807b1eff9f6f to your computer and use it in GitHub Desktop.
Save malonehedges/a312fb5ba48861522b00807b1eff9f6f to your computer and use it in GitHub Desktop.
/**
*
* 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