forked from ElemeFE/element-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRadio.tsx
58 lines (52 loc) · 2.27 KB
/
Radio.tsx
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
47
48
49
50
51
52
53
54
55
56
57
58
import * as React from 'react'
import { Radio } from 'element-react'
import { Radio as RadioNext } from 'element-react/next'
class Component extends React.Component<{}, {}> {
state = {
value: 3
}
onChange = (value) => { }
render() {
const { value } = this.state
return (
<div>
<Radio value="1" />
<Radio value={1}>111</Radio>
<Radio value={true} />
<Radio value="1" onChange={this.onChange} disabled={true} checked={false} name="111" className="className" style={{ width: 100 }} />
<Radio.Group>
<Radio value="3">备选项</Radio>
</Radio.Group>
<Radio.Group size="small">
<Radio value="3">备选项</Radio>
</Radio.Group>
<Radio.Group value={value} onChange={this.onChange} disabled={false} size="large" textColor="red" fill="blue" className="className" style={{ width: 100 }}>
<Radio value="3">备选项</Radio>
</Radio.Group>
<Radio.Group value={value}>
<Radio.Button value="3">备选项</Radio.Button>
<Radio.Button value="3" disabled={true} name="121" className="className" style={{ width: 100 }}>备选项</Radio.Button>
<Radio.Button value="6" />
</Radio.Group>
<RadioNext value="1" />
<RadioNext value={1}>111</RadioNext>
<RadioNext value={true} />
<RadioNext value="1" onChange={this.onChange} disabled={true} checked={false} name="111" className="className" style={{ width: 100 }} />
<RadioNext.Group>
<RadioNext value="3">备选项</RadioNext>
</RadioNext.Group>
<RadioNext.Group size="small">
<RadioNext value="3">备选项</RadioNext>
</RadioNext.Group>
<RadioNext.Group value={value} onChange={this.onChange} disabled={false} size="large" textColor="red" fill="blue" className="className" style={{ width: 100 }}>
<RadioNext value="3">备选项</RadioNext>
</RadioNext.Group>
<RadioNext.Group value={value}>
<RadioNext.Button value="3">备选项</RadioNext.Button>
<RadioNext.Button value="3" disabled={true} name="121" className="className" style={{ width: 100 }}>备选项</RadioNext.Button>
<RadioNext.Button value="6" />
</RadioNext.Group>
</div>
)
}
}