A component library for Unbrace using React and Styled Components.
Using npm
npm install @unbrace/components
Using yarn
yarn add @unbrace/components
You can import all our components from @unbrace/components
import { Badge } from '@unbrace/components';
All components are built with styled components and a default theme. To override this default theme you need to have a <ThemeProvider>
in your app, and override the desired values as described in the components storybook.
In this basic example we will override a buttons background color
Button theme schema (found in storybook)
{
button: {
color: 'red';
background: 'green';
}
Your own theme
{
button: {
// we don't need to pass color, you only have to specifiy overrides
background: 'blue';
}
}
To run the storybook, clone the source code from the components github page.
Then run
npm run storybook
or
yarn storybook