0.1.7 • Published 2 years ago
cash-ui-library-test v0.1.7
Getting Started
This project, will help to have the same icons, components and colors between projects.
Install
- yarn install
- yarn storybook
open browser in http://localhost:6006/
How it works
- SVG Images
- Need to create or add into a folder the svg image.
- In the carpet "images" need to create the name of the component with the follow pattern: "{nameImage}{number_Pixel}Px.svg"
- Create a normal component of react
- Copy the content of the svg image and return it into the component.
- In the index of folder "images" export the default component to be found.
- In the index of src folder export it too.
- New component
- Need to create a folder with the name of component
- Create 3 files, {name}.scss, {name}.jsx and {name}.stories.jsx (stories is the file detected by storybook to display it)
- Export it into the index in src folder.
- SCSS files IMPORTANT: Each time we create a new scss file, we need to add it into the "style-guide.scss" file.
- Colors.scss is the main file where we add the hex color. Should be HEX to avoid have repeated colors.
- To use any color, in the scss file of component just import ""@import "../colors/colors.scss";"
Publish new version
First, be sure you're login into npm and yarn.
Run: npm login Run: yarn login
In terminal:
- yarn buildPublish -> this generate the build of package
- yarn publish -> this publish the version into yarn
- npm publish -> this publish the version into npm