JSPM

@instructure/canvas-theme

10.25.1-snapshot-0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1571
  • Score
    100M100P100Q141043F
  • License MIT

A theme for Canvas LMS made by Instructure Inc.

Package Exports

    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/canvas-theme) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    canvas-theme

    npm MIT License Code of Conduct

    A UI component theme made by Instructure Inc.

    This theme has WCAG 2.1 Level AA minimum contrast requirement.

    Installation

    npm install @instructure/canvas-theme

    Usage

    Before mounting (rendering) your React application:

    import { theme } from '@instructure/canvas-theme'
    
    ReactDOM.render(
      <InstUISettingsProvider theme={theme}>
        <App />
      </InstUISettingsProvider>,
      element
    )

    To override the variables:

    import { theme } from '@instructure/canvas-theme'
    const themeOverrides = { spacing: { xxxSmall: '0.3rem' } }
    
    ReactDOM.render(
      <InstUISettingsProvider theme={{ ...theme, ...themeOverrides }}>
        <App />
      </InstUISettingsProvider>,
      element
    )