@@ -7,7 +7,7 @@ import {ItemInput} from './List'
77import styled from 'styled-components'
88import { StyledHeader } from './Header'
99import { StyledDivider } from './Divider'
10- import { useColorSchemeVar , useTheme } from '../ThemeProvider'
10+ import { useTheme } from '../ThemeProvider'
1111import {
1212 activeDescendantActivatedDirectly ,
1313 activeDescendantActivatedIndirectly ,
@@ -17,33 +17,14 @@ import {useSSRSafeId} from '@react-aria/ssr'
1717import { ForwardRefComponent as PolymorphicForwardRefComponent } from '@radix-ui/react-polymorphic'
1818import { AriaRole } from '../utils/types'
1919
20- /**
21- * These colors are not yet in our default theme. Need to remove this once they are added.
22- */
2320const customItemThemes = {
2421 default : {
25- hover : {
26- light : 'rgba(46, 77, 108, 0.06)' ,
27- dark : 'rgba(201, 206, 212, 0.12)' ,
28- dark_dimmed : 'rgba(201, 206, 212, 0.12)'
29- } ,
30- focus : {
31- light : 'rgba(54, 77, 100, 0.16)' ,
32- dark : 'rgba(201, 206, 212, 0.24)' ,
33- dark_dimmed : 'rgba(201, 206, 212, 0.24)'
34- }
22+ hover : get ( 'colors.neutral.subtle' ) ,
23+ focus : get ( 'colors.neutral.muted' )
3524 } ,
3625 danger : {
37- hover : {
38- light : 'rgba(234, 74, 90, 0.08)' ,
39- dark : 'rgba(248, 81, 73, 0.16)' ,
40- dark_dimmed : 'rgba(248, 81, 73, 0.16)'
41- } ,
42- focus : {
43- light : 'rgba(234, 74, 90, 0.14)' ,
44- dark : 'rgba(248, 81, 73, 0.24)' ,
45- dark_dimmed : 'rgba(248, 81, 73, 0.24)'
46- }
26+ hover : get ( 'colors.danger.subtle' ) ,
27+ focus : get ( 'colors.danger.muted' )
4728 }
4829} as const
4930
@@ -397,10 +378,9 @@ export const Item = React.forwardRef((itemProps, ref) => {
397378 } ,
398379 [ onAction , disabled , itemProps , onClick ]
399380 )
400-
401381 const customItemTheme = customItemThemes [ variant ]
402- const hoverBackground = useColorSchemeVar ( customItemTheme . hover , 'inherit' )
403- const focusBackground = useColorSchemeVar ( customItemTheme . focus , 'inherit' )
382+ const hoverBackground = customItemTheme . hover
383+ const focusBackground = customItemTheme . focus
404384
405385 const { theme} = useTheme ( )
406386
0 commit comments