@react-theming/theme-swatch

1.0.0 • Public • Published

npm version

@react-theming/theme-swatch

Install

npm i @react-theming/theme-swatch

Usage

import { createSwatch } from '@react-theming/theme-swatch';
/* you need to provide a `styled` functions from Styled Components, Emotion or '@storybook/theming'  */
import styled from '@emotion/styled';

const ThemeSwatch = createSwatch(styled);

colors = ['red', 'green', '#13f0b7', 'rgb(100,180,250)'];

const YourComponent = () => {
  return <ThemeSwatch theme={colors} size={64} />;
};

example

Credits

Created with ❤︎ to React and CSS-in-JS by @usulpro [React Theming]

Readme

Keywords

none

Package Sidebar

Install

npm i @react-theming/theme-swatch

Weekly Downloads

24,366

Version

1.0.0

License

MIT

Unpacked Size

19.2 kB

Total Files

10

Last publish

Collaborators

  • usulpro
  • smartlight