kits-core
Version:
Kits core module
35 lines (27 loc) • 1.5 kB
Markdown
# PCheckbox
## How to using it?
- Import
```
import PCheckBox from 'components/uielements/PCheckBox';
```
- Using
```
<PCheckBox
id={'ca__cb-channel-metrics'}
className={`${cssClassWrapper}__checkbox`}
type={'square-outline'}
checked={filterColumns.isShowChannelMetrics}
onChange={(isChecked) => updateFilterUI(isChecked, 'isShowChannelMetrics')}
label={'Chanel Metrics'}/>
```
- Declare props
|#ID |Property Name |Data type |Description |Default |
|--- |--- |--- |--- |--- |
|1. |key |string |Key to defined component render |unset |
|2. |id |string |id of DOM element |cb-<label> |
|3. |type |enum |type `square`, `square-outline`, `circle` |null |
|4. |checked |boolean |boolean `true`, `false` |false |
|5. |onChange |function |type `checkbox`, `option` |()=>{} |
|6. |label |string |Label name for checkbox | '' |
|7. |className |string |Class name css for elements | '' |
- Notes: