@amomedia/backoffice-ui
v1.0.43
Published
Ui-kit for backoffice
Downloads
56
Readme
Run storybook
npm install
- install all dependencies
npm run storybook
- start storybook in dev mode
Install as package
First install dependencies in your project:
Required dependencies:
npm install react react-dom @mui/material @emotion/react @emotion/styled
Optional dependencies:
npm install @mui/icons-material
Then install backoffice-ui package itself:
npm install @amomedia/backoffice-ui
Package contains 4 parts:
- core - all common components, utils and hooks
- types - all common types
- theme - Material UI theme configuration
- mocks - handlers for Mock Service Worker
Usage in project
In your root level entry point e.g main.ts
:
// first import dependencies from material-ui
import { ThemeProvider } from '@mui/material/styles';
// then import theme
import { defaultTheme } from '@amomedia/backoffice-ui/dist/theme';
// finally wrap Your App with ThemeProvider
<ThemeProvider theme={defaultTheme}>
<YourAppContainer />
</ThemeProvider>
Inside your app on any page/container e.g Main.tsx
:
import { Button } from '@amomedia/backoffice-ui/dist/core';
// ...
// in your react components
// ...
<Button>Test button</Button>
Development/Publishing
To build storybook you need to run:
npm run build-storybook
To build storybook you need to run:
npm run build-storybook
To build package you need to run:
npm run build
To start tests you need to run:
npm run test
or npm run test -- --watch
To build and update package you need to run:
npm run release