Created
February 22, 2016 14:33
-
-
Save ALF-er/f044d9ce1cc84146ad53 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import React, { PropTypes } from "react"; | |
import cx from "classnames"; | |
import { getComponentClassName } from "utils/ComponentsUtils"; | |
import "./UnverifiedDataToggle.scss"; | |
const UnverifiedDataToggle = ({ className, value, onChange }) => { | |
const ccn = getComponentClassName("unverified-data-toggle"); | |
return ( | |
<label className={cx(ccn(), value && ccn("--selected"), className)}> | |
<input | |
type="checkbox" | |
className={ccn("checkbox")} | |
checked={value} | |
onChange={onChange} | |
/> | |
Include unverified data | |
</label> | |
); | |
}; | |
UnverifiedDataToggle.propTypes = { | |
className: PropTypes.string, | |
value: PropTypes.bool, | |
onChange: PropTypes.func | |
}; | |
UnverifiedDataToggle.defaultProps = { | |
value: false, | |
onChange: _.noop | |
}; | |
export default UnverifiedDataToggle; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment