kennethmoveo-uicomponents
v1.1.55
Published
## Content
Downloads
1,495
Readme
Shared Library
Content
UI Components
To the full list of UI components available on this library, please run storybook npm run storybook
.
Utils
In src/utils
we have two files for useful functions, dateUtils
and numberUtils
. All the functions and their documentation are inside the files.
Types/Constants
In src/consts
and src/models
you can find many files containing constants, types and enums that are relevant to the different projects.
Library Maintenance
Add a new component
To add a new component, you will need to follow these steps:
- Bring the component as a folder inside
components
folder. - You must have the component file, the styles file and types file (story for Storybook is optional).
- You will need to add an
index.ts
inside the component folder to export the component as default:export { default as GeneralButton } from "./Button"
. - You will have to add a new line to the file
index.ts
that is undercomponents
folder for the component you want to export:export * from "./Button"
.
Publish a new version
In order to publish a new version of the library to NPM, you will need to follow these steps:
- Execute
npm run build
in order to generate a new dist folder. - Change in
package.json
the version number to a new one (that doesn't exists in NPM). - Execute
npm publish
and a new version will be uploaded to NPM. You will have to be logged in into a NPM account, if you are not logged in, runnpm login
before you run the publish script.