File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 1
- import EnumerationDemo , { EnumerationType } from './components/EnumerationDemo' ;
1
+ import EnumerationDemo , {
2
+ EnumerationType ,
3
+ ThemeColors ,
4
+ } from './components/EnumerationDemo' ;
2
5
3
6
function App ( ) {
4
7
const queryParams = new URLSearchParams ( window . location . search ) ;
@@ -12,9 +15,22 @@ function App() {
12
15
demoType = queryParams . get ( 'demoType' ) as EnumerationType ;
13
16
}
14
17
18
+ const customColors = { } as ThemeColors ;
19
+ customColors . background = queryParams . get ( 'background' ) || undefined ;
20
+ customColors . primary = queryParams . get ( 'primary' ) || undefined ;
21
+ customColors . secondary = queryParams . get ( 'secondary' ) || undefined ;
22
+ customColors . accent = queryParams . get ( 'accent' ) || undefined ;
23
+ customColors . gridLines = queryParams . get ( 'gridLines' ) || undefined ;
24
+
25
+ const isDarkMode = queryParams . get ( 'isDarkMode' ) === 'true' ;
26
+
15
27
return (
16
28
< div className = 'min-h-screen flex items-center justify-center p-4' >
17
- < EnumerationDemo demoType = { demoType } />
29
+ < EnumerationDemo
30
+ demoType = { demoType }
31
+ customColors = { customColors }
32
+ isDarkMode = { isDarkMode }
33
+ />
18
34
</ div >
19
35
) ;
20
36
}
You can’t perform that action at this time.
0 commit comments