88 Popover ,
99 UnstyledButton ,
1010 useMantineTheme ,
11- useMantineColorScheme ,
1211} from "@mantine/core" ;
1312import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown" ;
1413import CloudOutlinedIcon from "@mui/icons-material/CloudOutlined" ;
@@ -47,7 +46,6 @@ const GroupedFormatDropdown = ({
4746} : GroupedFormatDropdownProps ) => {
4847 const [ dropdownOpened , setDropdownOpened ] = useState ( false ) ;
4948 const theme = useMantineTheme ( ) ;
50- const { colorScheme } = useMantineColorScheme ( ) ;
5149
5250 const groupedOptions = useMemo ( ( ) => {
5351 const groups : Record < string , FormatOption [ ] > = { } ;
@@ -100,18 +98,12 @@ const GroupedFormatDropdown = ({
10098 borderRadius : theme . radius . sm ,
10199 backgroundColor : disabled
102100 ? theme . colors . gray [ 1 ]
103- : colorScheme === "dark"
104- ? theme . colors . dark [ 6 ]
105- : theme . white ,
101+ : "var(--dropdown-trigger-bg)" ,
106102 cursor : disabled ? "not-allowed" : "pointer" ,
107103 width : "100%" ,
108104 color : disabled
109- ? colorScheme === "dark"
110- ? theme . colors . dark [ 1 ]
111- : theme . colors . dark [ 7 ]
112- : colorScheme === "dark"
113- ? theme . colors . dark [ 0 ]
114- : theme . colors . dark [ 9 ] ,
105+ ? "var(--dropdown-trigger-text-disabled)"
106+ : "var(--dropdown-trigger-text)" ,
115107 } }
116108 >
117109 < Group justify = "space-between" >
@@ -123,10 +115,7 @@ const GroupedFormatDropdown = ({
123115 fontSize : "1rem" ,
124116 transform : dropdownOpened ? "rotate(180deg)" : "rotate(0deg)" ,
125117 transition : "transform 0.2s ease" ,
126- color :
127- colorScheme === "dark"
128- ? theme . colors . dark [ 2 ]
129- : theme . colors . gray [ 6 ] ,
118+ color : "var(--dropdown-trigger-icon)" ,
130119 } }
131120 />
132121 </ Group >
@@ -138,9 +127,8 @@ const GroupedFormatDropdown = ({
138127 maxWidth : "90vw" ,
139128 maxHeight : "40vh" ,
140129 overflow : "auto" ,
141- backgroundColor :
142- colorScheme === "dark" ? theme . colors . dark [ 7 ] : theme . white ,
143- border : `0.0625rem solid ${ colorScheme === "dark" ? theme . colors . dark [ 4 ] : theme . colors . gray [ 4 ] } ` ,
130+ backgroundColor : "var(--dropdown-panel-bg)" ,
131+ border : `0.0625rem solid var(--dropdown-panel-border)` ,
144132 } }
145133 >
146134 < Stack gap = "md" >
@@ -149,8 +137,8 @@ const GroupedFormatDropdown = ({
149137 < Text
150138 size = "sm"
151139 fw = { 600 }
152- c = { colorScheme === "dark" ? "dark.2" : "gray.6" }
153140 mb = "xs"
141+ style = { { color : "var(--dropdown-group-label)" } }
154142 >
155143 { groupName }
156144 </ Text >
0 commit comments