diff --git a/components/Select/index.scss b/components/Select/index.scss index 4bcfa38c..f949b240 100644 --- a/components/Select/index.scss +++ b/components/Select/index.scss @@ -24,6 +24,11 @@ } } + &.Disabled:hover { + background-color: var(--input-bg); + cursor: not-allowed; + } + &[data-placeholder] > span:not(.SelectIcon) { color: var(--text-secondary); } diff --git a/components/Select/index.tsx b/components/Select/index.tsx index 8d8945e1..ca0e0cf9 100644 --- a/components/Select/index.tsx +++ b/components/Select/index.tsx @@ -30,6 +30,14 @@ const Select = React.forwardRef(function Select( const [open, setOpen] = useState(false) const [value, setValue] = useState('') + const triggerClasses = classNames( + { + SelectTrigger: true, + Disabled: props.disabled, + }, + props.triggerClass + ) + useEffect(() => { setOpen(props.open) }, [props.open]) @@ -67,14 +75,18 @@ const Select = React.forwardRef(function Select( onOpenChange={props.onOpenChange} > - - - + {!props.disabled ? ( + + + + ) : ( + '' + )}