# Button组件

## 组件API

### Button
 size: 'medium',
 disabled: false, 
 href: '',//可选如果设置的话会用a标签而不是button
 target: '',//可选，与href一起使用，a标签的target属性
 icons: '',//与hasIcon协作使用，如果hasIcon为true,则该项起作用，在button文字前面加icon标志，默认为空
 onClick: noop,
 userClassName: '',
 iconClassName: '',
 title: '按钮',//按钮上的文案
 backgroundColor:'',//用户当成prop传入或者放到css中都可以 建议放到props传入 避免多个css会发生覆盖问题
 color:'',//用户当成props传入或者放到css中都可以  建议放道props中传入  避免多个css会发生覆盖问题

- `size: enumerate` ： `Button`的 `size` 只能为['large','small','medium']三种中的一种；
- `disabled: Boolean` ：button是否为禁用状态；
- `href:String` :如果用户想让button为a链接类型 则只需要输入href属性值即可;
- `target:String` :与href值对应使用;
- `icons:String` :button的title前面是否有图标 如果有则输入icons的属性值 如：icons='&#xe64b;'
- `userClassName:String`:用户输入的class  将覆盖掉原有的background,color,border-radius等属性
- `iconClassName:String`:当有icons的时候 与icons属性值对应使用 比如当icons='&#xe64b;' iconClassName='iconfont'
- `title:String`: button 的展示文字 默认展示为按钮字样
- `onClick: Function` : 用户点击button的时候触发的事件；
- `backgroundColor:String`:用户输入的自定义的背景颜色
- `color`:用户输入的自定义的字体颜色



## button使用方法

```
import React, { Component } from 'react';
import {Button}  from './components/Button'
let props={

title:'示例'，
backgroundColor:'yellow',
};
class App extends Component {
  constructor(props) {
    super(props);
   
  }
  render() {
    return (
      <div className="App">
        <h1>点睛前端RadioGroup组件</h1>
	        <h3>RadioGroup 和 Radio 组件</h3>
	      
           <div className="App-intro">
        <Button {...props} />
        </div>
      </div>
    )
  }
}
export default App;
```