ck-antd
v0.0.6
Published
A React component library built with Ant Design and Vite
Maintainers
Readme
My React Component Library
一个基于 React 18 和 Ant Design 的组件库示例。
安装
npm install ck-antd使用
基本使用
import React from 'react';
import { Button, Card } from 'ck-antd';
function App() {
return (
<div>
<Card title="示例卡片">
<Button type="primary">主要按钮</Button>
</Card>
</div>
);
}
export default App;按需引入
本组件库支持按需引入,仅引入需要的组件,减少打包体积。
// 只引入 Button 组件
import Button from 'ck-antd/dist/Button';
function MyButton() {
return <Button type="primary">按需引入的按钮</Button>;
}组件列表
- Button: 基于 Ant Design 的按钮组件
- Card: 基于 Ant Design 的卡片组件
构建
如果你想本地构建这个组件库:
npm run build发布到 npm
- 修改 package.json 中的版本号
- 登录 npm:
npm login - 发布:
npm publish
许可证
MIT
