@thesis-ui/checkbox
v0.2.1
Published
Thesis UI - Checkbox component
Downloads
8
Maintainers
Readme
Checkbox component - Thesis UI
Installation
$ yarn add @thesis-ui/checkbox
$ npm install @thesis-ui/checkbox
Usage
import Checkbox from '@thesis-ui/checkbox';
const [isChecked, setIsChecked] = useState(false);
function onChange() {
setIsChecked(!isChecked);
}
<Checkbox
isChecked={isChecked}
value="testValue"
labelValue={`Click me to ${isChecked ? 'uncheck' : 'check'}`}
onChange={onChange}
/>