0.0.12 • Published 2 years ago
@real-system/theme v0.0.12
Usage
Installation
# install peer dependencies
# npm
$ npm install --save @real-system/styling react react-dom
# yarn
$ yarn add @real-system/styling react react-dom
# install theme
# npm
$ npm install --save @real-system/theme
# yarn
$ yarn add @real-system/theme
Code Example
import { ThemeProvider, useToken } from '@real-system/theme';
const OtherComponent = () => {
const token = useToken('color-background');
return (
<div style={{ backgroundColor: token }}>...</div>
);
};
const MyComponent = () => {
return (
<ThemeProvider>
<OtherComponent />
</ThemeProvider>
);
};