Package Exports
- @instructure/ui-themes
- @instructure/ui-themes/es/index.js
- @instructure/ui-themes/lib
- @instructure/ui-themes/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@instructure/ui-themes) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
category: packages
ui-themes
Installation
npm install @instructure/ui-themesUsage
Before mounting (rendering) your React application:
global theming:
import { canvas } from '@instructure/ui-themes' canvas.use()
application level theming:
import { canvas } from '@instructure/ui-themes' ReactDOM.render( <InstUISettingsProvider theme={canvas}> <App /> </InstUISettingsProvider>, element )
To override the theme variables:
globally:
import { canvas } from '@instructure/ui-themes' canvas.use({ overrides: { colors: { brand: 'red' } } })
application level:
import { canvas } from '@instructure/ui-themes' const themeOverrides = { colors: { brand: 'red' } } ReactDOM.render( <InstUISettingsProvider theme={{ ...canvas, ...themeOverrides }}> <App /> </InstUISettingsProvider>, element )
You can read more about how our theming system works and how to use it here