2
2
// Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license
3
3
4
4
import React from 'react' ;
5
- import { Button } from '../../buttons/base/example' ;
6
- import SvgIcon from '../../../shared/svg-icon' ;
5
+ import ButtonIcon from '../' ;
7
6
8
7
export default [
9
8
{
10
9
id : 'default' ,
11
- label : 'Button Icon – Default' ,
10
+ label : 'Bare – Default' ,
12
11
element : (
13
- < Button className = "slds-button slds-button_icon" title = "More Options" >
14
- < SvgIcon
15
- sprite = "utility"
16
- symbol = "settings"
17
- className = "slds-button__icon"
18
- />
19
- </ Button >
12
+ < ButtonIcon
13
+ assistiveText = "More options"
14
+ title = "More options"
15
+ />
20
16
)
21
17
}
22
18
] ;
@@ -26,91 +22,81 @@ export let examples = [
26
22
id : 'button-icon-large' ,
27
23
label : 'Bare - Size Large' ,
28
24
element : (
29
- < Button className = "slds-button slds-button_icon" title = "More Options" >
30
- < SvgIcon
31
- sprite = "utility"
32
- symbol = "settings"
33
- className = "slds-button__icon slds-button__icon_large"
34
- />
35
- </ Button >
25
+ < ButtonIcon
26
+ iconClassName = "slds-button__icon_large"
27
+ assistiveText = "More options"
28
+ title = "More options"
29
+ />
36
30
)
37
31
} ,
38
32
{
39
33
id : 'button-icon-small' ,
40
34
label : 'Bare - Size Small' ,
41
35
element : (
42
- < Button className = "slds-button slds-button_icon" title = "More Options" >
43
- < SvgIcon
44
- sprite = "utility"
45
- symbol = "settings"
46
- className = "slds-button__icon slds-button__icon_small"
36
+ < ButtonIcon
37
+ iconClassName = "slds-button__icon_small"
38
+ assistiveText = "More options"
39
+ title = "More options"
47
40
/>
48
- </ Button >
49
41
)
50
42
} ,
51
43
{
52
44
id : 'button-icon-x-small' ,
53
45
label : 'Bare - Size Extra Small' ,
54
46
element : (
55
- < Button className = "slds-button slds-button_icon" title = "More Options" >
56
- < SvgIcon
57
- sprite = "utility"
58
- symbol = "settings"
59
- className = "slds-button__icon slds-button__icon_x-small"
60
- />
61
- </ Button >
47
+ < ButtonIcon
48
+ iconClassName = "slds-button__icon_x-small"
49
+ assistiveText = "More options"
50
+ title = "More options"
51
+ />
62
52
)
63
53
} ,
64
54
{
65
55
id : 'button-icon-contained-large' ,
66
56
label : 'Contained - Size Large' ,
67
57
element : (
68
- < Button className = "slds-button slds-button_icon slds-button_icon-border slds-button_icon-large" title = "More Options" >
69
- < SvgIcon
70
- sprite = "utility"
71
- symbol = "settings"
72
- className = "slds-button__icon"
73
- />
74
- </ Button >
58
+ < ButtonIcon
59
+ className = "slds-button_icon-border"
60
+ size = "large"
61
+ assistiveText = "More options"
62
+ title = "More options"
63
+ />
75
64
)
76
65
} ,
77
66
{
78
67
id : 'button-icon-contained-small' ,
79
68
label : 'Contained - Size Small' ,
80
69
element : (
81
- < Button className = "slds-button slds-button_icon slds-button_icon-border slds-button_icon-small" title = "More Options" >
82
- < SvgIcon
83
- sprite = "utility"
84
- symbol = "settings"
85
- className = "slds-button__icon"
86
- />
87
- </ Button >
70
+ < ButtonIcon
71
+ className = "slds-button_icon-border"
72
+ size = "small"
73
+ assistiveText = "More options"
74
+ title = "More options"
75
+ />
88
76
)
89
77
} ,
90
78
{
91
79
id : 'button-icon-contained-x-small' ,
92
80
label : 'Contained - Size Extra Small' ,
93
81
element : (
94
- < Button className = "slds-button slds-button_icon slds-button_icon-border slds-button_icon-x-small" title = "More Options" >
95
- < SvgIcon
96
- sprite = "utility"
97
- symbol = "settings"
98
- className = "slds-button__icon"
99
- />
100
- </ Button >
82
+ < ButtonIcon
83
+ className = "slds-button_icon-border"
84
+ size = "x-small"
85
+ assistiveText = "More options"
86
+ title = "More options"
87
+ />
101
88
)
102
89
} ,
103
90
{
104
91
id : 'button-icon-contained-xx-small' ,
105
92
label : 'Contained - Size Extra Extra Small' ,
106
93
element : (
107
- < Button className = "slds-button slds-button_icon slds-button_icon-border slds-button_icon-xx-small" title = "More Options" >
108
- < SvgIcon
109
- sprite = "utility"
110
- symbol = "settings"
111
- className = "slds-button__icon"
112
- />
113
- </ Button >
94
+ < ButtonIcon
95
+ className = "slds-button_icon-border"
96
+ size = "xx-small"
97
+ assistiveText = "More options"
98
+ title = "More options"
99
+ />
114
100
)
115
101
}
116
102
] ;
0 commit comments