1.0.0 • Published 3 years ago

@react-theming/theme-swatch v1.0.0

Weekly downloads
2,340
License
MIT
Repository
github
Last release
3 years ago

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

1.0.0

3 years ago

0.2.1

3 years ago

0.2.2

3 years ago

0.2.0

4 years ago

0.1.1

4 years ago

0.1.0

5 years ago