Theme provider
The ThemeProvider
component will make all buttons anywhere inside of the ThemeProvider
use the associated theme without needing to set the onDark
prop. Note that as of now this is only detected by Button components.
Props
Property | Required | Type | Default | Description |
---|---|---|---|---|
theme | false | oneOf(['light', 'dark']) | 'light' | The theme all children components should adhere to. |
Imports
Import React components (including CSS):
import {ThemeProvider} from 'pivotal-ui/react/theme-context';
Import CSS only:
import 'pivotal-ui/css/theme-context';