1.0.17 • Published 5 months ago
p9-ui-kit v1.0.17
P9 UI library kit
A compact UI kit designed for Planet9 use cases.
Installation
For install components via for development use your lovely package manager
# Width Yarn
yarn add p9-ui-kit
# With npm
npm install p9-ui-kit
# With pnpm
pnpm add p9-ui-kit
How to use
import { Button } from "p9-ui-kit";
const App = () => {
return (
<div>
<Button>Click Me</Button>
</div>
);
};
export default App;
Installation for development
To develop library components, install the necessary dependencies using one of the following commands:
# With Yarn, Preferred method :)
yarn
# With npm
npm i
# Or with pnpm
pnpm i
This will be sufficient to get started with development.
Testing
To create a test, simply create a .test.tsx file within your component directory and write your test cases there
To run the tests, use the default command for your package manager:
# Width Yarn
yarn test
# With npm
npm run test
# With pnpm
pnpm test
Storybook Support
To create a story, create a file for your component with the suffix .stories.tsx and write your story within that file.
To run Storybook, use the default command for your package manager:
# Width Yarn
yarn storybook
# With npm
npm run storybook
# With pnpm
pnpm storybook
That's it! Have a good day! :)