BaseProvider

BaseProvider provides a single wrapper to configure your application. It adds a LayersManager and a ThemeProvider to hangle styling and stacking context in the application.

Wrap your application with the BaseProvider at its root:

import {BaseProvider, LightTheme} from 'baseui'; import {Provider as StyletronProvider} from 'styletron-react'; export default function App() { return ( <StyletronProvider value={engine}> <BaseProvider theme={LightTheme}> <YourApp /> </BaseProvider> </StyletronProvider> ); }

BaseProvider API

Warning any = "Prop types are not shown in dev mode"

extract-react-types is not being run in dev mode for speed reasons. If you need to see prop types add the environment variable FORCE_EXTRACT_REACT_TYPES eg:

  • FORCE_EXTRACT_REACT_TYPES=true yarn start <packageName>
  • FORCE_EXTRACT_REACT_TYPES=true yarn start:<team>