JSPM

@instructure/ui-themes

10.12.1-snapshot-5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 15427
  • Score
    100M100P100Q142907F
  • License MIT

A library of instructure themes

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/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

    npm MIT License Code of Conduct

    Installation

    npm install @instructure/ui-themes

    Usage

    Before mounting (rendering) your React application:
    • application level theming:

      ---
      type: code
      ---
      import canvas from '@instructure/ui-themes'
      
      ReactDOM.render(
        <InstUISettingsProvider theme={canvas}>
          <App />
        </InstUISettingsProvider>,
        element
      )
    • (DEPRECATED) global theming:

      ---
      type: code
      ---
      import canvas from '@instructure/ui-themes'
      
      canvas.use()
    To override the theme variables:
    • (DEPRECATED) globally:

      ---
      type: code
      ---
      import canvas from '@instructure/ui-themes'
      
      canvas.use({ overrides: { colors: { brand: 'red' } } })
    • application level:

      ---
      type: code
      ---
      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