JSPM

  • Created
  • Published
  • 0
  • Score
    100M100P100Q48857F
  • License MIT

theming for real system

Package Exports

  • @real-system/theme-library
  • @real-system/theme-library/lib/index.esm.js
  • @real-system/theme-library/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 (@real-system/theme-library) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@real-system/theme-library

Real System's theming components and helpers.

npm version

Usage

Installation

# install peer dependencies

# npm
$ npm install --save @real-system/styling-library react react-dom
# yarn
$ yarn add @real-system/styling-library react react-dom

# install theme

# npm
$ npm install --save @real-system/theme-library
# yarn
$ yarn add @real-system/theme-library

Code Example

import { ThemeProvider, useTokens } from '@real-system/theme-library';

const OtherComponent = () => {
  const [bgColor, textColor] = useToken({
    colors: 'white',
    colors: 'gray-500'
  });
  return (
    <div style={{ backgroundColor: bgColor, color: textColor }}>...</div>
  );
};

const MyComponent = () => {
  return (
    <ThemeProvider>
      <OtherComponent />
    </ThemeProvider>
  );
};