@@ -6,6 +6,7 @@ import { SimpleDefaults } from 'react-polymorph/lib/themes/simple';
66import DevTools from 'mobx-react-devtools' ;
77import { Router } from 'react-router-dom' ;
88import { IntlProvider } from 'react-intl' ;
9+ import { ChakraProvider , extendTheme } from '@chakra-ui/react' ;
910import { Routes } from './Routes' ;
1011import { daedalusTheme } from './themes/daedalus' ;
1112import { themeOverrides } from './themes/overrides' ;
@@ -20,6 +21,29 @@ import type { StoresMap } from './stores/index';
2021import type { ActionsMap } from './actions/index' ;
2122import NewsFeedContainer from './containers/news/NewsFeedContainer' ;
2223
24+ const theme = extendTheme ( {
25+ fonts : {
26+ body : 'NotoSans-Regular, NotoSansCJKjp-Regular' ,
27+ heading : 'NotoSans-Regular, NotoSansCJKjp-Regular' ,
28+ mono : 'NotoSans-Regular, NotoSansCJKjp-Regular' ,
29+ } ,
30+ components : {
31+ Text : {
32+ baseStyle : {
33+ fontFamily : 'NotoSans-Regular, NotoSansCJKjp-Regular' ,
34+ } ,
35+ } ,
36+ } ,
37+ colors : {
38+ stakePoolSaturation : {
39+ green : '--theme-staking-stake-pool-saturation-green-color' ,
40+ orange : '--theme-staking-stake-pool-saturation-orange-color' ,
41+ red : '--theme-staking-stake-pool-saturation-red-color' ,
42+ yellow : '--theme-staking-stake-pool-saturation-yellow-color' ,
43+ } ,
44+ } ,
45+ } ) ;
46+
2347@observer
2448class App extends Component < {
2549 stores : StoresMap ;
@@ -55,46 +79,48 @@ class App extends Component<{
5579 }
5680
5781 return (
58- < Fragment >
59- { /* @ts -ignore ts-migrate(2769) FIXME: No overload matches this call. */ }
60- < ThemeManager variables = { themeVars } />
61- < Provider stores = { stores } actions = { actions } >
62- < ThemeProvider
63- theme = { daedalusTheme }
64- skins = { SimpleSkins }
65- variables = { SimpleDefaults }
66- themeOverrides = { themeOverrides }
67- >
68- < IntlProvider
69- { ...{
70- locale,
71- key : locale ,
72- messages : translations [ locale ] ,
73- } }
82+ < ChakraProvider theme = { theme } >
83+ < Fragment >
84+ { /* @ts -ignore ts-migrate(2769) FIXME: No overload matches this call. */ }
85+ < ThemeManager variables = { themeVars } />
86+ < Provider stores = { stores } actions = { actions } >
87+ < ThemeProvider
88+ theme = { daedalusTheme }
89+ skins = { SimpleSkins }
90+ variables = { SimpleDefaults }
91+ themeOverrides = { themeOverrides }
7492 >
75- < Fragment >
76- < Router history = { history } >
77- < Routes />
78- </ Router >
79- { mobxDevTools }
80- { [
81- // @ts -ignore ts-migrate(2345) FIXME: Argument of type 'string' is not assignable to par... Remove this comment to see the full error message
82- isActiveDialog ( ABOUT ) && < AboutDialog key = "aboutDialog" /> ,
83- // @ts -ignore ts-migrate(2345) FIXME: Argument of type 'string' is not assignable to par... Remove this comment to see the full error message
84- isActiveDialog ( DAEDALUS_DIAGNOSTICS ) && (
85- < DaedalusDiagnosticsDialog key = "daedalusDiagnosticsDialog" />
86- ) ,
87- < NotificationsContainer key = "notificationsContainer" /> ,
88- ] }
89- { canShowNews && [
90- < NewsFeedContainer key = "newsFeedList" /> ,
91- < NewsOverlayContainer key = "newsFeedOverlay" /> ,
92- ] }
93- </ Fragment >
94- </ IntlProvider >
95- </ ThemeProvider >
96- </ Provider >
97- </ Fragment >
93+ < IntlProvider
94+ { ...{
95+ locale,
96+ key : locale ,
97+ messages : translations [ locale ] ,
98+ } }
99+ >
100+ < Fragment >
101+ < Router history = { history } >
102+ < Routes />
103+ </ Router >
104+ { mobxDevTools }
105+ { [
106+ // @ts -ignore ts-migrate(2345) FIXME: Argument of type 'string' is not assignable to par... Remove this comment to see the full error message
107+ isActiveDialog ( ABOUT ) && < AboutDialog key = "aboutDialog" /> ,
108+ // @ts -ignore ts-migrate(2345) FIXME: Argument of type 'string' is not assignable to par... Remove this comment to see the full error message
109+ isActiveDialog ( DAEDALUS_DIAGNOSTICS ) && (
110+ < DaedalusDiagnosticsDialog key = "daedalusDiagnosticsDialog" />
111+ ) ,
112+ < NotificationsContainer key = "notificationsContainer" /> ,
113+ ] }
114+ { canShowNews && [
115+ < NewsFeedContainer key = "newsFeedList" /> ,
116+ < NewsOverlayContainer key = "newsFeedOverlay" /> ,
117+ ] }
118+ </ Fragment >
119+ </ IntlProvider >
120+ </ ThemeProvider >
121+ </ Provider >
122+ </ Fragment >
123+ </ ChakraProvider >
98124 ) ;
99125 }
100126}
0 commit comments