npm.io
11.7.3 • Published 1 month ago

@instructure/ui-themes

Licence
MIT
Version
11.7.3
Deps
2
Size
4.6 MB
Vulns
0
Weekly
0
Stars
478

ui-themes

npm MIT License Code of Conduct

Installation

npm install @instructure/ui-themes
Usage
Before mounting (rendering) your React application:
import canvas from '@instructure/ui-themes'

ReactDOM.render(
  <InstUISettingsProvider theme={canvas}>
    <App />
  </InstUISettingsProvider>,
  element
)
To override the theme variables:
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