|
@@ -5,7 +5,12 @@ import classnames from 'classnames'
|
5
|
5
|
const InputGroupText = props => {
|
6
|
6
|
return (
|
7
|
7
|
<label className={classnames(`${props.parentClassName}`, props.customClass, 'custom-control custom-checkbox')}>
|
8
|
|
- <input type='checkbox' className='custom-control-input' />
|
|
8
|
+ <input
|
|
9
|
+ type='checkbox'
|
|
10
|
+ className='custom-control-input'
|
|
11
|
+ checked={props.checked}
|
|
12
|
+ onChange={props.onChange}
|
|
13
|
+ />
|
9
|
14
|
<span className={classnames(`${props.parentClassName}__checkbox`, 'custom-control-indicator')} />
|
10
|
15
|
<span className={classnames(`${props.parentClassName}__label`, 'custom-control-description')}>
|
11
|
16
|
{props.label}
|
|
@@ -18,6 +23,8 @@ export default InputGroupText
|
18
|
23
|
|
19
|
24
|
InputGroupText.PropTypes = {
|
20
|
25
|
parentClassName: PropTypes.string.isRequired,
|
|
26
|
+ checked: PropTypes.bool.isRequired,
|
|
27
|
+ onChange: PropTypes.func.isRequired,
|
21
|
28
|
customClass: PropTypes.string,
|
22
|
29
|
label: PropTypes.string
|
23
|
30
|
}
|