comp-button
v1.0.5
Published
basic react component
Downloads
4
Readme
comp-button
API
| 属性 | 说明 | 类型 | 默认值 |
| ---- | ---- | ---- | ---- |
| extendType | 拓展的按钮类型,支持 success
、danger
、warning
、info
、secondary
| String | |
其他参数与 Antd Button 一致
Example
import React from 'react';
import { render } from 'react-dom';
import { Icon } from 'antd';
import CompButton from 'comp-button';
render(
<div style={{padding: 40}}>
<h2>Antd Normal</h2>
<CompButton type="primary" style={{marginRight: 20}}>primary</CompButton>
<CompButton type="default" style={{marginRight: 20}}>default</CompButton>
<CompButton type="dashed" style={{marginRight: 20}}>dashed</CompButton>
<CompButton type="danger" style={{marginRight: 20}}>danger</CompButton>
<br />
<br />
<h2>Custom Extend</h2>
<CompButton extendType="success" style={{marginRight: 20}}><Icon type="check" />success</CompButton>
<CompButton extendType="danger" style={{marginRight: 20}}>danger</CompButton>
<CompButton extendType="warning" style={{marginRight: 20}}>warning</CompButton>
<CompButton extendType="info" style={{marginRight: 20}}>info</CompButton>
<CompButton extendType="secondary" style={{marginRight: 20}}>secondary</CompButton>
</div>,
document.getElementById('app')
);
Development
$ npm run start
Build
$ npm run build
Publish
$ npm publish