@frontend-kasplo/kasplo-ui-components
Version:
UI Components Library
111 lines (81 loc) โข 2.28 kB
Markdown
# Kasplo UI Components
A React component library for Kasplo projects.
## Features
- ๐จ Modern and customizable components
- ๐ฆ Built with TypeScript for better type safety
- ๐ Comprehensive documentation and examples
- โฟ๏ธ Accessibility-first components
- ๐ฏ Optimized bundle size
- ๐งช Thoroughly tested components
## Installation
```bash
npm install @frontend-kasplo/kasplo-ui-components
```
or with yarn:
```bash
yarn add @frontend-kasplo/kasplo-ui-components
```
## Usage
```jsx
import { Chip, Button, Counter } from '@frontend-kasplo/kasplo-ui-components';
function App() {
return (
<div>
<Chip
label="Example Chip"
backgroundColor="#3B82F6"
textColor="#FFFFFF"
/>
<Button>Click Me</Button>
<Counter initialValue={0} />
</div>
);
}
```
## Available Components
- `Chip`: A customizable chip/tag component
- `Button`: A customizable button component
- `Counter`: A counter component with increment/decrement functionality
## Props
### Chip
- `label`: string (required)
- `backgroundColor`: string (optional)
- `textColor`: string (optional)
- `borderColor`: string (optional)
- `className`: string (optional)
## Development
1. Clone the repository:
```bash
git clone https://github.com/Kasplo-dev/kasplo-ui-components.git
cd kasplo-ui-components
```
2. Install dependencies:
```bash
npm install
```
3. Start Storybook:
```bash
npm run storybook
```
4. Run tests:
```bash
npm test
```
## Available Scripts
- `npm run build` - Build the library
- `npm run test` - Run tests
- `npm run test:watch` - Run tests in watch mode
- `npm run test:coverage` - Run tests with coverage
- `npm run storybook` - Start Storybook development server
- `npm run build-storybook` - Build Storybook for production
- `npm run lint` - Run ESLint
- `npm run lint:fix` - Fix ESLint errors
- `npm run format` - Format code with Prettier
## Contributing
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
## License
This project is licensed under the ISC License - see the LICENSE file for details.