React UI component library
``sh
// npm
npm i @wavv/ui
// yarn
yarn add @wavv/ui
// pnpm
pnpm add @wavv/ui
`
@wavv/ui currently has three peer dependencies: react, react-dom, and @emotion/react.
`sh
// npm
npm i react react-dom @emotion/react
// yarn
yarn add react react-dom @emotion/react
// pnpm
pnpm add react react-dom @emotion/react
`
A ThemeProvider needs to wrap the entire app so that all @wavv/ui components can use those styles.
By default, there is a light and a dark theme on the theme object exported by @wavv/ui. More can be read about the theme and how to customize it here.
`jsx
import React from 'react';
import { ThemeProvider } from '@emotion/react';
import { theme, ResetStyles, ScrollbarStyles } from '@wavv/ui';
const App = () => {
const currentTheme = theme.light;
return (
{/ app contents /}
);
};
`
Documentation can be found at ui.wavv.com
For new v2 components, pnpm storybook can be ran to bring up more detailed documentation for props.
When a change is ready to be pushed to the library and published to NPM, the best method is to use the cli.
1. pnpm cli
2. Bump version (stick with the pre-release alpha version for now).
3. Document what changes are going out by answering the cli prompts.
4. You can answer "no" to the prompt for creating a new branch.
5. The final prompt asks if you would like to publish to npm. This will handle the alpha version tag for you.
If something goes wrong with using the CLI, or another change needs to be added to the build before publishing to npm, there are a couple different scripts that can be run to manually build and publish the library.
1. pnpm build:lib will run another build for the library, ensuring your new changes are included.package.json
2. Make sure the version in is the new version that should go out if it hasn't already been changed by the cli prompts.pnpm pub:alpha
3. will publish to npm with the correct alpha` tag since we are sticking to a pre-release tag for now.
This project is licensed under the terms of the MIT license.