button
react button component for tinper-bee
可定制的按钮组件
使用
使用单独的button包
组件引入
先进行下载bee-button包
npm install --save bee-button
组件调用
;ReactDOM;
样式引入
- 可以使用link引入build目录下Button.css
<link rel="stylesheet" href="./node_modules/bee-button/build/Button.css">
- 可以在js中import样式
//或是
API
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
size | 按钮大小(lg xg sm ) |
string | - |
colors | 颜色(primary/accent/success/info/warning/danger/default) | string | '' |
shape | 形状(block/round/squared/floating/pillRight/pillLeft/border/icon) | string | '' |
disabled | 是否禁用(disabled 或 true false ) |
string | false |
className | 增加额外的class | string | '' |
htmlType | html dom 的 type 属性(submit button reset ) |
string | button |
style | style 属性 | object | '' |
setup develop environment
$ npm install -g bee-tools$ git clone https://github.com/tinper-bee/bee-button$ cd bee-button$ npm install$ npm run dev