File tree 1 file changed +19
-2
lines changed
1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,22 @@ import * as d3int from 'd3-interpolate'
7
7
import { ThemeContext } from '../util/themecontext'
8
8
import { usePersistantState } from '../util/persistant-state'
9
9
import { themes } from '../components/themes'
10
+ import { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'
11
+
12
+ const helpers = createMultiStyleConfigHelpers ( [ 'menu' , 'item' ] )
13
+ const Menu = helpers . defineMultiStyleConfig ( {
14
+ baseStyle : {
15
+ item : {
16
+ backgroundColor : 'white' ,
17
+ "_focus" : {
18
+ backgroundColor : 'gray.200' ,
19
+ } ,
20
+ _hover : {
21
+ backgroundColor : 'gray.200' ,
22
+ } ,
23
+ } ,
24
+ } ,
25
+ } )
10
26
11
27
function MyApp ( { Component, pageProps } : AppProps ) {
12
28
type Theme = [ string , { [ color : string ] : string } ]
@@ -31,11 +47,11 @@ function MyApp({ Component, pageProps }: AppProps) {
31
47
useEffect ( ( ) => {
32
48
setEmacsTheme (
33
49
JSON . parse ( localStorage . getItem ( 'colorTheme' ) ?? JSON . stringify ( initialTheme ) ) ??
34
- initialTheme ,
50
+ initialTheme ,
35
51
)
36
52
setHighlightColor (
37
53
JSON . parse ( localStorage . getItem ( 'highlightColor' ) ?? JSON . stringify ( highlightColor ) ) ??
38
- highlightColor ,
54
+ highlightColor ,
39
55
)
40
56
setIsInitialized ( true )
41
57
} , [ ] )
@@ -190,6 +206,7 @@ function SubApp(props: any) {
190
206
} ,
191
207
} ) ,
192
208
} ,
209
+ Menu,
193
210
} ,
194
211
}
195
212
} , [ highlightColor , JSON . stringify ( emacsTheme ) ] )
You can’t perform that action at this time.
0 commit comments