File tree Expand file tree Collapse file tree 1 file changed +12
-14
lines changed
src/components/shared/select Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,13 @@ export const Select = ({
3434 setSelectedLabel ( label )
3535 }
3636
37+ const triggerStyle = clsx ( 'w-210' , {
38+ 'pointer-events-none cursor-not-allowed' : disabled ,
39+ } )
40+
3741 return (
3842 < Dropdown >
39- < Dropdown . Trigger
40- className = { clsx ( 'w-210' , {
41- 'pointer-events-none cursor-not-allowed' : disabled ,
42- } ) }
43- aria-disabled = { disabled }
44- >
43+ < Dropdown . Trigger className = { triggerStyle } aria-disabled = { disabled } >
4544 < DropdownTriggerBox
4645 selectedLabel = { selectedLabel || placeholder }
4746 selected = { ! ! selectedLabel }
@@ -72,15 +71,14 @@ const DropdownTriggerBox = ({
7271 selected : boolean
7372} ) => {
7473 const { isOpen } = useDropdownContext ( )
74+ const triggerBoxClass = clsx (
75+ 'h-48 justify-between p-12 text-body1 font-medium text-gray-500 focus:border-primary-normal' ,
76+ { 'text-gray-800' : selected } ,
77+ { 'bg-gray-200 text-gray-400' : disabled }
78+ )
79+
7580 return (
76- < Box
77- className = { clsx (
78- 'h-48 justify-between p-12 text-body1 font-medium text-gray-500 focus:border-primary-normal' ,
79- { 'text-gray-800' : selected } ,
80- { 'bg-gray-200 text-gray-400' : disabled }
81- ) }
82- rounded = { 8 }
83- >
81+ < Box className = { triggerBoxClass } rounded = { 8 } >
8482 { selectedLabel }
8583 { isOpen ? < IcCaretUp /> : < IcCaretDown /> }
8684 </ Box >
You can’t perform that action at this time.
0 commit comments