@liene-putnina/react-components-for-you
v1.6.0
Published
Storybook-based React component library
Downloads
45
Maintainers
Readme
react-components-for-you
Overview
A React component library showcased with Storybook.
See the components here
This is a WIP.
Installation
To install the package, run:
yarn add @liene-putnina/react-components-for-you
You also need to install the following peer dependencies:
react react-dom
Usage
Import either the whole library or specific components
// Imports the whole library
import * from '@liene-putnina/react-components-for-you';
// Imports a single component
import { Button } from '@liene-putnina/react-components-for-you';
Add them to your code
// The component without variants
const MyComponent = () => {
return (
<Button>{children}<Button/>
)
};
// The component with variants
const MyComponent = () => {
return (
<Button variant={ButtonVariant.DANGER}>{children}<Button/>
)
};
Due to the structure of this library, the css of the components is not included by default. In order to get the styling working, add the following line to your global style file:
@import '@liene-putnina/react-components-for-you/dist/index.css';
Development
Uses node version 16.x.x
To run locally
# Opens the storybook dev server on `http://localhost:6006/`
yarn storybook
To build
# Builds the library
yarn build
# Builds the static storybook page
yarn build-storybook
License
Licensed under MIT License.