1.0.1 • Published 4 years ago
salalem-ui v1.0.1
Run storybook
npm install
- to install all dependencies
npm run storybook
- to run storybook with local dev server
Install as package
First install dependencies in your project:
npm install react react-dom @material-ui/core @material-ui/icons
Then install salalem-ui package itself:
npm install salalem-ui
Usage in project
In your root level entry point
// first import dependencies from material-ui
import { ThemeProvider, createMuiTheme } from '@material-ui/core/styles';
// then import your theme GreenTheme/GrayTheme/BlueTheme
import { GreenTheme } from 'salalem-ui/dist/themes';
// import css styles
import 'salalem-ui/dist/lib.css';
<ThemeProvider theme={createMuiTheme(GreenTheme)}>
<YourAppContainer />
</ThemeProvider>
In your app.js
import { Button } from 'salalem-ui';
...
// in your react components
...
<Button>Test button</Button>
Development/Publishing
To update package you need to build it first:
npm run build:prod
then increase version of the package:
npm version
then finally publish it to npm:
npm publish