Open leonth opened 7 years ago
After following the instructions in the README (setting up ThemeProvider), this does not work:
ThemeProvider
import * as React from 'react' import { Layout } from 'react-toolbox/lib/layout/Layout' import { NavDrawer } from 'react-toolbox/lib/layout/NavDrawer' import { Panel } from 'react-toolbox/lib/layout/Panel' export default function({ children }) { return ( <Layout> <NavDrawer>[nav here]</NavDrawer> <Panel> {children} </Panel> </Layout> ) }
However, this works / renders correctly:
import * as React from 'react' import { Layout } from 'react-toolbox/lib/layout/Layout' import { NavDrawer } from 'react-toolbox/lib/layout/NavDrawer' import { Panel } from 'react-toolbox/lib/layout/Panel' import * as theme from '../react-toolbox/theme' export default function({ children }) { return ( <Layout theme={theme}> <NavDrawer theme={theme}>[nav here]</NavDrawer> <Panel theme={theme}> {children} </Panel> </Layout> ) }
It seems to only affect Layout components - at least AppBar and Button does not have this issue.
Layout
AppBar
Button
After following the instructions in the README (setting up
ThemeProvider
), this does not work:However, this works / renders correctly:
It seems to only affect
Layout
components - at leastAppBar
andButton
does not have this issue.