File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 15
15
*/
16
16
17
17
import React from 'react'
18
- import Select , { components } from 'react-select'
18
+ import Select , { OptionProps , components } from 'react-select'
19
19
import { ReactComponent as ClearIcon } from '../Assets/Icon/ic-appstatus-cancelled.svg'
20
20
import { ReactComponent as Check } from '../Assets/Icon/ic-check.svg'
21
21
import { ReactComponent as RedWarning } from '../Assets/Icon/ic-error-medium.svg'
22
22
import { Checkbox } from './Checkbox'
23
23
import { CHECKBOX_VALUE } from './Types'
24
24
25
- export const Option = ( props ) => {
26
- const { selectOption, data } = props
25
+ export const Option = ( props : OptionProps ) => {
26
+ const { selectOption, data, isDisabled } = props
27
27
28
28
const handleChange = ( e ) => {
29
29
selectOption ( data )
30
30
}
31
31
32
32
return (
33
33
< div
34
- className = " flex left pl-12 cursor dc__gap-8"
34
+ className = { ` flex left pl-12 cursor dc__gap-8 ${ isDisabled ? 'dc__disabled' : '' } ` }
35
35
style = { { background : props . isFocused ? 'var(--N100)' : 'transparent' } }
36
36
>
37
37
< Checkbox
38
38
isChecked = { props . isSelected || false }
39
39
onChange = { handleChange }
40
40
value = { CHECKBOX_VALUE . CHECKED }
41
41
rootClassName = "mb-0 w-20"
42
+ disabled = { isDisabled || false }
42
43
/>
43
44
< components . Option { ...props } />
44
45
</ div >
You can’t perform that action at this time.
0 commit comments