npm.io
2.0.2 • Published 3 years ago

react-aui

Licence
MIT
Version
2.0.2
Deps
9
Size
161 kB
Vulns
0
Weekly
0
Stars
3

React AUI · GitHub license GitHub code size in bytes

React AUI library Storybook Components

Development

  • run storybook dev server npm run dev
  • commit changes and push, github actions and semantic realease deploy changes to npm and update github pages automatically

Production

  • Install npm package npm i react-aui
  • Init AUIProvider into root of your project:
import { GlobalStyles, ITheme, darkTheme, color } from 'react-aui';

const theme: ITheme = {
	...darkTheme, / ...or your options
};
const App = () => {
	return (
		<AUIProvider theme={theme}>
			<GlobalStyles normalize>
				{(t) => `
					html {
						color-scheme: dark;
					}

					body {
						font-family: Arial, sans-serif;
						background-color: ${color('bg')({ theme: t })};
						color: ${color('text')({ theme: t })};
						transition: 0.3s background;
					}
				`}
			</GlobalStyles>

			{/* react components... */}
		</AUIProvider>
	);
};

Keywords