This package is not supported anymore. UI components were transferred to product UI.
nvm
yarn
nvm install 16
nvm use 16
To install dependencies please run yarn lerna bootstrap
in repository root.
yarn build
To watch files when development
yarn watch
yarn build:storybook
will build storybook to static assets in ./storybook-dist
that can be uploaded to server
For development, please use storybook stories.
yarn start
Important: Adding new component, remember: you need to use named export to allow @shortlist/app
or whatever will use that package to be able to tree shake library.
OK:
import React from 'react';
import s from './styles.scss';
const Button = props => <button type="button" className={s.button} {...props} />;
export { Button }; // Use named export
Wrong:
import React from 'react';
import s from './styles.scss';
const Button = props => <button type="button" className={s.button} {...props} />;
export default Button; // Don't use default export
Also, don't forget to re-export new component from src/index.jsx
.
...
export { Button } from 'components/button';
...