v3.0.0
Refactors Checkbox component that attaches text label next to the checkbox element
Usage
<Checkbox label="Checkbox label" />
The label prop is optional, you can use children to pass through the component.
<Checkbox label="Checkbox label">
<p style={{ marginLeft: 24 }}>
Lorem ipsum dolor sit amet...
</p>
</Checkbox>
<Checkbox>
<span style={{ verticalAlign: 'middle', marginLeft: 8 }}>
Lorem ipsum dolor sit amet...
</span>
</Checkbox>
Uncontrolled Checkbox
// Default checked
<Checkbox defaultChecked />
// Default partially checked
<Checkbox defaultChecked defaultIndeterminate />
Controlled Checkbox
// Checked
<Checkbox checked />
// Partially checked
<Checkbox checked indeterminate />