custom-components-library-dibrugh
v1.0.11
Published
Documentation:
Readme
Documentation:
Project - Innowise Lab Internship: Custom-components-lib
Task - Create custom components UI library.
Technical requirements:
- [x] Configure ESLint, Prettier, implemented pre-commit hook
- [x] Configure webpack for React, TS, Jest.
- [x] CSS modules (SCSS) are presumed to be used for styling
- [x] All components should be represented in Storybook
- [x] Prepare unit tests using Jest and React testing library, all props should be covered with tests
- [x] Documentation is obligatory
Links:
Npm
Repository
Components:
Button
Required props:
- variant: “text” | “contained” | “outlined” , contained as default
- disabled
- onClick
- size: “small” | “medium” | “large”

Checkbox
Required props:
- checked
- onChange
- disabled
- label

Switch
Required props:
- checked
- onChange
- disabled

Modal
Required props:
- open
- onClose
- children

Textfield
Required props:
- disabled
- error

Select
Required props:
- options

Available Scripts and Commands
# Install
npm i # install dependencies# General
> npm pub # build app and publish to npm
> npm run storybook # run storybook locally# Test
> npm run test # run tests using Jest and React testing libraryFolder structure
- PROJECT
- /.__mocks (svg mocks for correct testing)
- /.husky (git hooks such as pre-commit hook)
- /dist (production build of the project)
- /node_modules (dependencies)
- /src (development version of the project)
- /components (project components)
- global.d.ts (typescript declaration)
- index.js
- ...configuration files.
