1
1
2
2
Default Props Prop Values
3
- * label='' Required Prop
3
+ * label=undefined Required Prop
4
4
* variant='base' ['base', 'neutral', 'brand', 'destructive', 'icon'] Use icon if you want an icon only button
5
- * disabled={false}
6
- * tabindex=''
7
- * inverse={false}
8
- * stateful={false}
9
- * responsive={false}
10
- * iconName='' see https://www.lightningdesignsystem.com/resources/icons#utility for names
11
- * iconVariant='bare' ['bare', 'container', 'border', 'border-filled', 'small', 'more']
12
- * iconSize='medium' ['x-small', 'medium', 'small', 'large']
13
- * iconPosition='left' ['left', 'right', 'large']
14
- * className = '' custom classes on the button tag
5
+ * disabled=false
6
+ * tabindex=undefined
7
+ * inverse=false
8
+ * stateful=false
9
+ * responsive=false
10
+ * iconName=undefined see https://www.lightningdesignsystem.com/resources/icons#utility for names
11
+ * className=undefined custom classes on the button tag
12
+
13
+ ** If iconName exists
14
+ * iconVariant='bare' ['bare', 'container', 'border', 'border-filled', 'small', 'more']
15
+ * iconSize='medium' ['x-small', 'medium', 'small', 'large']
16
+ * iconPosition='left' ['left', 'right', 'large']
17
+
18
+ ** If stateful=true
19
+ * notSelectedIcon=undefined
20
+ * notSelectedLabel=undefined
21
+ * selectedIcon=undefined
22
+ * selectedLabel=undefined
23
+ * selectedFocusIcon=undefined
24
+ * selectedFocusLabel=undefined
15
25
16
26
1. <SLDSButton label='Neutral' variant='neutral' onClick={this.handleNeutralClick} />
17
27
2. <SLDSButton label='Neutral Icon' variant='neutral' iconName='download' iconSize='small' iconPosition='right' onClick={this.handleNeutralClick} />
@@ -20,3 +30,14 @@ Default Props Prop Values
20
30
5. <SLDSButton label='Settings' variant='icon' iconName='settings' iconSize='large' onClick={this.handleIconClick} />
21
31
6. <SLDSButton label='User' variant='icon' inverse={true} iconName='user' iconSize='large' onClick={this.handleIconClick} />
22
32
7. <SLDSButton label='Edit' variant='icon' hint={true} iconName='edit' iconSize='large' onClick={this.handleIconClick} />
33
+ 8. <SLDSButton
34
+ label='Follow'
35
+ variant='neutral'
36
+ stateful={true}
37
+ notSelectedIcon='add'
38
+ notSelectedLabel='Follow'
39
+ selectedIcon='check'
40
+ selectedLabel='Following'
41
+ selectedFocusIcon='close'
42
+ selectedFocusLabel='Unfollow'
43
+ onClick={this.handleStatefulClick} />
0 commit comments