ui-component-storybook
v1.0.11
Published
This project contains refactored React components, converted from class components to functional components with TypeScript. The components are organized in a Storybook and built as a library.
Readme
UI Component Storybook
This project contains refactored React components, converted from class components to functional components with TypeScript. The components are organized in a Storybook and built as a library.
Project Structure
/src/components/- Refactored React functional components with TypeScript/old-components/- Original class-based components (reference only)/.storybook/- Storybook configuration/stories/- Storybook stories
Development
# Install dependencies
npm install
# Run Storybook
npm run devBuilding
# Build the library
npm run build
# Build Storybook
npm run build-storybookUsage
# Install the library
npm install ui-component-storybookImporting Components
import { Checkbox, RadioButton } from 'ui-component-storybook';Importing Styles
To use the component styles, import the CSS file in your application:
// Import this in your main app file (e.g., App.jsx or index.js)
import 'ui-component-storybook/dist/styles.css';Component Migration Process
- Components from
/old-components/are being refactored to functional components with TypeScript - Refactored components are placed in
/src/components/ - Stories are created for each component
- Library is built with compatibility for React 17+
Features
- React Functional Components
- TypeScript type definitions
- Storybook documentation
- Vite for development
- Rollup for library building
- Compatible with React 17+
