1- import 'react-toggle/style.css'
2- import { Suspense , lazy } from 'react'
3- import { Route , Routes } from 'react-router-dom'
41import { ApolloProvider } from '@apollo/client'
5- import { IntercomProvider } from 'react-use-intercom '
6- import { Grommet , ThemeType } from 'grommet '
2+ import { mergeDeep } from '@apollo/client/utilities '
3+ import { GrowthBook , GrowthBookProvider } from '@growthbook/growthbook-react '
74import {
85 BreadcrumbsProvider ,
96 GlobalStyle ,
10- honorableThemeDark ,
11- honorableThemeLight ,
12- styledThemeDark ,
13- styledThemeLight ,
147 useThemeColorMode ,
158} from '@pluralsh/design-system'
169import { MarkdocContextProvider } from '@pluralsh/design-system/dist/markdoc'
10+ import { Grommet , ThemeType } from 'grommet'
1711import {
1812 CssBaseline ,
1913 ThemeProvider as HonorableThemeProvider ,
2014 mergeTheme ,
2115} from 'honorable'
16+ import mpRecipe from 'honorable-recipe-mp'
17+ import { Suspense , lazy } from 'react'
18+ import { Route , Routes } from 'react-router-dom'
19+ import 'react-toggle/style.css'
20+ import { IntercomProvider } from 'react-use-intercom'
2221import styled , {
2322 StyleSheetManager ,
2423 ThemeProvider as StyledThemeProvider ,
2524} from 'styled-components'
26- import { mergeDeep } from '@apollo/client/utilities'
27- import mpRecipe from 'honorable-recipe-mp'
28- import { GrowthBook , GrowthBookProvider } from '@growthbook/growthbook-react'
2925
3026import { shouldForwardProp } from './utils/shouldForwardProp'
3127
3228import { PluralErrorBoundary } from './components/utils/PluralErrorBoundary'
3329
34- import { client } from './helpers/client'
35- import { INTERCOM_APP_ID } from './constants'
36- import { DEFAULT_THEME } from './theme'
37- import { HistoryRouter , browserHistory } from './router'
38- import { growthbook } from './helpers/growthbook'
30+ import {
31+ polyfilledHonorableThemeDark ,
32+ polyfilledHonorableThemeLight ,
33+ polyfilledStyledThemeDark ,
34+ polyfilledStyledThemeLight ,
35+ } from './styles'
3936import { OverlayContextProvider } from './components/layout/Overlay'
40- import NavContextProvider from './contexts/NavigationContext'
4137import { CursorPositionProvider } from './components/utils/CursorPosition'
38+ import { INTERCOM_APP_ID } from './constants'
39+ import NavContextProvider from './contexts/NavigationContext'
40+ import { client } from './helpers/client'
41+ import { growthbook } from './helpers/growthbook'
42+ import { HistoryRouter , browserHistory } from './router'
43+ import { DEFAULT_THEME } from './theme'
4244
4345const Plural = lazy ( ( ) => import ( './components/Plural' ) )
4446const Invite = lazy ( ( ) => import ( './components/Invite' ) )
@@ -105,7 +107,9 @@ function App() {
105107 const colorMode = useThemeColorMode ( )
106108
107109 const honorableTheme = mergeTheme (
108- colorMode === 'light' ? honorableThemeLight : honorableThemeDark ,
110+ colorMode === 'light'
111+ ? polyfilledHonorableThemeLight
112+ : polyfilledHonorableThemeDark ,
109113 {
110114 global : [
111115 // This provides the mp spacing props to honorable
@@ -114,7 +118,10 @@ function App() {
114118 ] ,
115119 }
116120 )
117- const styledTheme = colorMode === 'light' ? styledThemeLight : styledThemeDark
121+ const styledTheme =
122+ colorMode === 'light'
123+ ? polyfilledStyledThemeLight
124+ : polyfilledStyledThemeDark
118125 const mergedStyledTheme = mergeDeep ( DEFAULT_THEME , styledTheme )
119126
120127 const routes = (
@@ -182,6 +189,7 @@ function App() {
182189 < IntercomProvider appId = { INTERCOM_APP_ID } >
183190 < StyleSheetManager shouldForwardProp = { shouldForwardProp } >
184191 < HonorableThemeProvider theme = { honorableTheme } >
192+ { /* @ts -ignore - this will be fixed when we bump DS */ }
185193 < StyledThemeProvider theme = { mergedStyledTheme } >
186194 < GrowthBookProvider
187195 growthbook = { growthbook as any as GrowthBook }
0 commit comments