@panenco/shortlist-ui v1.0.95
Shortlist core UI library
Prerequisites
nvm
yarn
Install required version of node:
nvm install 16
nvm use 16
Installing dependencies
To install dependencies please run yarn lerna bootstrap
in repository root.
Build
yarn build
To watch files when development
yarn watch
Build Storybook
yarn build:storybook
will build storybook to static assets in ./storybook-dist
that can be uploaded to server
Development
For development, please use storybook stories.
yarn start
New components adding
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';
...
1 year ago
1 year ago
1 year ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago