@@ -25,26 +25,67 @@ ReactDOM.render( <Demo/> , mountNode);
25
25
- 按钮状态
26
26
27
27
默认正常,可设置激活、禁用状态
28
- <!-- ```jsx
29
- <Button active>Active Button</Button>
30
- <Button disabled>Disabled Button</Button>
31
- ``` -->
28
+
29
+ ::: demo 按钮状态
30
+ ``` jsx
31
+ import { Button } from ' cube-react' ;
32
+
33
+ class Demo2 extends React .Component {
34
+ render () {
35
+ return (
36
+ < div>
37
+ < Button active> Active Button< / Button>
38
+ < Button disabled> Disabled Button< / Button>
39
+ < / div>
40
+ )
41
+ }
42
+ }
43
+ ReactDOM .render ( < Demo2/ > , mountNode);
44
+ ```
45
+ :::
46
+
32
47
- 图标
33
48
34
49
可设置 icon 的 class
35
- <!-- ```jsx
36
- <Button icon="cubeic-right">Button With Icon</Button>
37
- ``` -->
50
+
51
+ ::: demo 图标
52
+ ``` jsx
53
+ import { Button } from ' cube-react' ;
54
+
55
+ class Demo2 extends React .Component {
56
+ render () {
57
+ return (
58
+ < Button icon= " cubeic-right" > Button With Icon< / Button>
59
+ )
60
+ }
61
+ }
62
+ ReactDOM .render ( < Demo2/ > , mountNode);
63
+ ```
64
+ :::
38
65
39
66
- 样子
40
67
41
68
可以通过设置 ` light ` 、` inline ` 、` outline ` 、` primary ` 属性来改变按钮样子
42
- <!-- ```jsx
43
- <Button light>Light Button</Button>
44
- <Button inline>Inline Button</Button>
45
- <Button outline>Outline Button</Button>
46
- <Button primary>Primary Button</Button>
47
- ``` -->
69
+
70
+ ::: demo 样子
71
+ ``` jsx
72
+ import { Button } from ' cube-react' ;
73
+
74
+ class Demo2 extends React .Component {
75
+ render () {
76
+ return (
77
+ < div>
78
+ < Button light> Light Button< / Button>
79
+ < Button inline> Inline Button< / Button>
80
+ < Button outline> Outline Button< / Button>
81
+ < Button primary> Primary Button< / Button>
82
+ < / div>
83
+ )
84
+ }
85
+ }
86
+ ReactDOM .render ( < Demo2/ > , mountNode);
87
+ ```
88
+ :::
48
89
49
90
### Props 配置
50
91
0 commit comments