-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.js
47 lines (45 loc) · 2.17 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import React, { Component } from 'react';
import { Button } from '../../../../src';
const ButtonGroup = Button.Group;
export default class App extends Component {
render() {
return <div>
<Button>按钮default</Button>
<Button size="small">按钮small</Button>
<Button size="large">按钮large</Button>
<Button disabled>按钮disabled</Button>
<br/><br/>
<Button type="primary">按钮primary</Button>
<Button type="primary" size="small">按钮primary</Button>
<Button type="primary" size="large">按钮primary</Button>
<Button type="primary" disabled>按钮disabled</Button>
<br/><br/>
<Button type="ghost">按钮ghost</Button>
<Button type="ghost" size="small">按钮ghost</Button>
<Button type="ghost" size="large">按钮ghost</Button>
<Button type="ghost" disabled>按钮ghost</Button>
<br/><br/>
<Button type="danger">按钮danger</Button>
<Button type="danger" size="small">按钮danger</Button>
<Button type="danger" size="large">按钮danger</Button>
<Button type="danger" disabled>按钮danger</Button>
<br/><br/>
<Button type="success">按钮success</Button>
<Button type="success" size="small">按钮success</Button>
<Button type="success" size="large">按钮success</Button>
<Button type="success" disabled>按钮success</Button>
<br/><br/>
<Button type="primary" onClick={()=>{alert('haha');}}>点击onClick出弹窗</Button>
<Button type="ghost" icon="monitor">Icon按钮</Button>
<Button type="ghost" icon="help"></Button>
<br/>
<h2>按钮组 Button.Group</h2>
<ButtonGroup>
<Button type="primary">按钮1</Button>
<Button type="primary">按钮2</Button>
<Button type="primary" onMouseEnter={(e)=>{console.log(e.target)}}>按钮3</Button>
<Button type="primary" onClick={(e)=>{console.log(e)}}>按钮4</Button>
</ButtonGroup>
</div>;
}
}