chocolate-ui
v1.1.6
Published
Indulge in silky smoothness
Maintainers
Readme
🐳 预览
chocolate-ui.com
⚡ 安装
使用 npm
npm install chocolate-ui --save使用 yarn
yarn add chocolate-ui📖 使用
1 .全部引入
// 加载样式
import 'chocolate-ui/dist/styles/index.css'
// 引入组件
import { Button } from 'chocolate-ui'2 .按需加载
import Button from 'chocolate-ui/dist/components/button';
import 'chocolate-ui/dist/components/button/style';3 .使用 babel-plugin-import
// .babelrc.js
module.exports = {
plugins: [
[
'babel-plugin-import',
{
libraryName: 'chocolate-ui',
libraryDirectory: 'dist/components',
style: true // 导入 CSS 源文件,可以在编译期间进行优化
}
],
]
}😊 谁在使用
- 我自己的 hooks 集合 -> chocolate-hooks
✨ 技术栈
- 😁 全部组件由
TypeScript with React Hooks编写 - 🍑 使用
react-testing-library完成单元测试 - 🦌 使用
Storybook本地调试和生成文档页面 - ⚙️ 组件库打包使用
Webpack和Gulp - 🥦 CI/CD:使用
Chromatic+GitActions持续集成和部署
🔨 部署

