macpaw-ui
Installation
Install with npm:
npm install --save @macpaw/macpaw-ui
or with yarn:
yarn add @macpaw/macpaw-ui
And import stylesheets manually:
import '@macpaw/macpaw-ui/lib/ui.css'
Adding new Component
- Add Component's JSX and styles to src/%ComponentName% directory
- Import Component's JS, styles to ui.js and ui.scss correspondingly
- Add document page in
/pages/%component-name%.mdx
Adding new Icons
- All common icons should have size 24x24px and dynamic (not hard-coded)
fill
attribute (so it can be changed / overridden later is CSS or React component)
- Add new SVG file icon to
src/Icons/svg/%name%_icon.svg
- Run
yarn icons
CLI command
Requirements
- Node 16+
- npm 7+ (lock file v2)
Release
Package published with Github Actions:
- Update version in package.json file
npm run version:patch
- for patch update e.g. X.X.1
npm run version:minor
- for minor update e.g. X.1.0
npm run version:major
- for minor update e.g. 1.0.0
- Create new release at Github
Host
- run
yarn build
- serve
out
directory as public