@pongo-ui/react-theme-generator
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

Theme Generator

The theme generator package is a tool used to easily and quickly create themes.

Use

  1. Install the @pongo-ui/react-theme-generator package.

Using NPM

npm install @pongo-ui/react-theme-generator

Using Yarn

yarn add @pongo-ui/react-theme-generator
  1. Set up the themeGenerator in your app:
import { themeGenerator } from './themeGenerator';

const hcTheme = themeGenerator({
  canvasColor: '#000000',
  semanticColors: {
    inherit: '#ffff00',
    brand: '#0029ff',
    success: '#278536',
    danger: '#de3309',
  },
});
  1. Integrate your theme in your provider and components
import { Provider } from '@pongo-ui/react-provider'
import { webLightTheme } from '@pongo-ui/react-theme'
import { Button } from '@pongo-ui/react-button'

const hcTheme = themeGenerator({
  canvasColor: '#000000',
  semanticColors: {
    inherit: '#ffff00',
    brand: '#0029ff',
    success: '#278536',
    danger: '#de3309',
  },

const MyApp = () => {
  return (
    <Provider theme={hcTheme}>
      <Button>Hello World</Button>
    <Provider>
  )
}

API

To learn more about the ThemeGenerator API take a look at the ThemeGenerator Interface file.

Readme

Keywords

none

Package Sidebar

Install

npm i @pongo-ui/react-theme-generator

Weekly Downloads

1

Version

0.1.2

License

MIT

Unpacked Size

106 kB

Total Files

150

Last publish

Collaborators

  • pongobuild
  • czearing