@hungle10/cart-ui-library
v1.0.0
Published
Cart UI Library - Standardized components for shopping cart functionality
Maintainers
Readme
Cart UI Library
Thư viện UI component chuẩn hóa cho chức năng giỏ hàng
Features
- UI Components: Button, Input, Modal, Card
- Cart Components: CartItem, CartList
- TypeScript Support: Đầy đủ type definitions
- Tailwind CSS: Styling mặc định
- Responsive Design: Hỗ trợ tất cả thiết bị
Installation
npm install @hung-cnpm/cart-ui-libraryUsage
import { Button, Input, Modal, Card, CartItem, CartList } from '@hung-cnpm/cart-ui-library';
// Components are ready to use!Components
Button
<Button
variant="primary"
size="medium"
onClick={() => {}}
>
Click me
</Button>Input
<Input
label="Enter quantity"
value={quantity}
onChange={setQuantity}
type="number"
/>Modal
<Modal
isOpen={open}
onClose={() => setOpen(false)}
title="Confirmation"
>
Are you sure?
</Modal>CartList
<CartList
items={cartItems}
onUpdateQuantity={handleUpdate}
onRemove={handleRemove}
onSelect={handleSelect}
onCheckout={handleCheckout}
/>License
MIT
