- Configure your .npmrc file. See working with the npm registry
- Install package:
npm i @bit-of-meat/ui-library
- Add provider to your
index
file
import React from 'react';
import ReactDOM from 'react-dom/client';
import { Provider } from '@bit-of-meat/ui-library';
import App from './App';
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<Provider>
<App />
</Provider>
);
In App.jsx file:
import { Dropdown } from '@bit-of-meat/ui-library';
export default () => {
return (
<div>
<p>Select: </p>
<Dropdown items={["Item #1", "Item #2", "Item #3"]} />
</div>
)
}
Script | Description |
npm run build | Run rollup bundle, output dir: ./dist |
npm run test:generate-output | Run test and saves their results in .jest-test-results.json file |
npm run test | Run tests |
npm run storybook | Run storybook dev server |
npm run build-storybook | Build storybook, output dir: ./storybook-static |
Made by Bit of Meat team.