neoui-react-button

0.0.2 • Public • Published

neoui-react-button


TL;DR

button ui component for react

setup develop environment

$ git clone https://github.com/iuap-design/neoui-react-button
$ cd neoui-react-button
$ npm install
$ gulp server

Usage

import Button from 'neoui-react-button';
React.render(<div>
    <div>
        <span>{"default:"}</span>
        <Button>Confirm</Button>
    </div>
    <div>
        <span>{"size:"}</span>
        <Button size="small">small</Button>
        <Button size="medium">medium</Button>
        <Button size="large">large</Button>
    </div>
    <div>
        <span>{"status:"}</span>
        <Button disabled>disabled</Button>
    </div>
    <div>
        <span>{"type:"}</span>
        <Button type="primary">default primary</Button>
        <Button type="outline">secondary</Button>
    </div>
    <div>
        <span>{"add event:"}</span>
        <Button onClick={function(){alert('click me')}}>click me</Button>
    </div>

</div>, document.getElementById('target'));

API

PROPS

Button

参数 说明 类型 默认值
size 按钮大小(large medium small) string medium
type 类型(primary secondary outline) string blue
disabled 是否禁用(disabledtrue false) string false
className 增加额外的class string ''
htmlType html dom 的 type 属性(submit button reset) string button
style style 属性 object

ButtonGroup

参数 说明 类型 默认值

Package Sidebar

Install

npm i neoui-react-button

Weekly Downloads

3

Version

0.0.2

License

MIT

Last publish

Collaborators

  • zhouby