# @beisen-platform/icon-button

> 平台图标按钮组件

Latest version **0.1.31** (published 2019-03-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install @beisen-platform/icon-button
pnpm add @beisen-platform/icon-button
yarn add @beisen-platform/icon-button
bun add @beisen-platform/icon-button
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.31 |
| Published | 2019-03-15 |
| First published | 2018-11-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 27 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | beisen |
| Maintainers | beisencorp |
| Keywords | beisen, react-component, es6 |

## Links

- npm: https://www.npmjs.com/package/@beisen-platform/icon-button
- Repository: http://gitlab.beisencorp.com/ux-cnpm/ux-icon-button
- npm.io page: https://npm.io/package/@beisen-platform/icon-button

## Recent versions

- 0.1.31 (latest) — 2019-03-15
- 0.1.30 — 2018-12-02
- 0.1.29 — 2018-11-29

## README

# icon-button使用说明

## 项目运行

1. cnpm install 或 npm install cnpm使用教程

2. npm run dev （开发环境打包 port:8080）

3. npm run test （测试用例）

4. npm run build （生产环境打包）

## IconButton参数

```javascript
{
  /** 按钮类型(string)。参数：
        1.默认:“default”
        2.弱化按钮：“weaken”
        3.连接按钮：“link”,将返回一个<a></a>
    */
  bsStyle: 'default',
    
  /** 是否激活 */
  active: false,
    
  /** 是否禁用 */
  disabled: false,
    
  /** 返回<a>的链接 */
  href: '',
    
  /** 返回<a>的title */
  title: '测试11',
    
  /** 点击按钮后的回调 */
  onClick: function(target,onClick,btnInfo) {
    console.log(target);  //输出e
    console.log(onClick); //输出true
    console.log(btnInfo); //输出this.state
  },

  /** 是否显示按钮 */
  hidden: false, //
    
  /** 按钮图标的className */
  iconName: "sys-icon-spread",
}
```

## icon-button调用方法

1.安装npm组件包

```
npm install @beisen/icon-button --save-dev
```

2.引用组件

  ```javascript
import IconButton from "@beisen/icon-button"
  ```


3. 传入参数

  该参数为上述参数，传入方式使用: {...参数}

  ```javascript
  {
    "bsStyle": "default"
      /**按钮类型(string)。参数：
                                      1.默认:“default”
                                      2.弱化按钮：“weaken”
                                      3.连接按钮：“link”,将返回一个<a></a>
                                  **/
      ,
    "active": false //是否激活
      ,
    "disabled": false //是否禁用
      ,
    "href": "" //返回<a>的链接
      ,
    "title": "测试11" //返回<a>的title
      ,
    "onClick": function(target,onClick,btnInfo) {
      console.log(target);  //输出e
      console.log(onClick); //输出true
      console.log(btnInfo); //输出this.state
    },
    "hidden": false //是否显示按钮
      ,
    "iconName": "sys-icon-spread"
  }
  
  render () {
      return (
        <IconButton {...this.state.IconData} />
      )
    }
  ```

---
_Source: https://npm.io/package/@beisen-platform/icon-button · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
