@instructure/instructure-theme
v9.10.0
Published
A theme for Instructure made by Instructure Inc.
Downloads
31,803
Maintainers
Keywords
Readme
category: packages
instructure-theme
A UI component theme for Instructure made by Instructure Inc.
This theme has a 3:1 minimum contrast requirement.
Installation
npm install @instructure/instructure-theme
Usage
Before mounting (rendering) your React application:
global theming:
import { theme } from '@instructure/instructure-theme' theme.use()
application level theming:
import { theme } from '@instructure/instructure-theme' ReactDOM.render( <InstUISettingsProvider theme={theme}> <App /> </InstUISettingsProvider>, element )
To override the variables:
globally:
import { theme } from '@instructure/instructure-theme' theme.use({ overrides: { colors: { brand: 'red' } } })
application level:
import { theme } from '@instructure/instructure-theme' const themeOverrides = { colors: { brand: 'red' } } ReactDOM.render( <InstUISettingsProvider theme={{ ...theme, ...themeOverrides }}> <App /> </InstUISettingsProvider>, element )