Unit tests
Landingi UI-kit is a set of react components. Getting started is simple. Just
add a @landingi/landingi-ui-kit
to your dependencies in package.json
.
If you don't have installed Yarn execute:
npm install --global pnpm
then to install project pacakges run in the project root:
pnpm install
- Create a folder inside
src/components/*
- Create
*.stories.tsx
file and rest of thets / tsx
files - In the `*.stories.tsx`` file add the following code:
import { YourComponent } from '@components/YourComponent'
import { ComponentMeta, ComponentStory } from '@storybook/react'
export default {
title: 'YourComponent',
component: YourComponent
} as ComponentMeta<typeof YourComponent>
const Template: ComponentStory<typeof YourComponent> = args => <YourComponent {...args} />
export const NameOfVariant = Template.bind({})
NameOfVariant.args = {
// your props
}
- Export your component in
src/index.ts
export * from '@components/YourComponent'
-
Run
pnpm storybook
and openhttp://localhost:6006
. Check if your component works as expected. -
Run
pnpm release-it
, stage all files -
Push it
pnpm storybook
- development and watchpnpm build
- build
Every push triggers CI pipeline. For more information please check
.github/workflows/ci.yml