Skip to content

Commit dafcc47

Browse files
committed
Update README
1 parent b58a74b commit dafcc47

File tree

2 files changed

+37
-24
lines changed

2 files changed

+37
-24
lines changed

README.md

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,31 @@ import {SLDSButton} from 'design-system-react';
4343
5. <SLDSButton label='Settings' variant='icon' iconName='settings' iconSize='large' onClick={this.handleIconClick} />
4444
6. <SLDSButton label='User' variant='icon' inverse={true} iconName='user' iconSize='large' onClick={this.handleIconClick} />
4545
7. <SLDSButton label='Edit' variant='icon' hint={true} iconName='edit' iconSize='large' onClick={this.handleIconClick} />
46+
8. <SLDSButton label='Follow' variant='neutral' stateful={true} notSelectedIcon='add' notSelectedLabel='Follow' selectedIcon='check' selectedLabel='Following' selectedFocusIcon='close' selectedFocusLabel='Unfollow' onClick={this.handleStatefulClick} />
4647

47-
Required Prop
48-
* Only label is required
49-
50-
Default Props Prop Values
51-
* label='' Required Prop
48+
Default Props Prop Values
49+
* label=undefined * Required Prop
5250
* variant='base' ['base', 'neutral', 'brand', 'destructive', 'icon'] Use icon if you want an icon only button
53-
* disabled={false}
54-
* tabindex=''
55-
* inverse={false}
56-
* stateful={false}
57-
* responsive={false}
58-
* iconName='' see https://www.lightningdesignsystem.com/resources/icons#utility for names
59-
* iconVariant='bare' ['bare', 'container', 'border', 'border-filled', 'small', 'more']
60-
* iconSize='medium' ['x-small', 'medium', 'small', 'large']
61-
* iconPosition='left' ['left', 'right', 'large']
62-
* className = '' custom classes on the button tag
51+
* disabled=false
52+
* tabindex=undefined
53+
* inverse=false
54+
* stateful=false
55+
* responsive=false
56+
* iconName=undefined see https://www.lightningdesignsystem.com/resources/icons#utility for names
57+
* className=undefined custom classes on the button tag
58+
59+
** If iconName exists
60+
* iconVariant='bare' ['bare', 'container', 'border', 'border-filled', 'small', 'more']
61+
* iconSize='medium' ['x-small', 'medium', 'small', 'large']
62+
* iconPosition='left' ['left', 'right', 'large'] If variant = icon, default icon position is centered.
63+
64+
** If stateful=true
65+
* notSelectedIcon=undefined
66+
* notSelectedLabel=undefined
67+
* selectedIcon=undefined
68+
* selectedLabel=undefined
69+
* selectedFocusIcon=undefined
70+
* selectedFocusLabel=undefined
6371

6472
```
6573

@@ -110,7 +118,15 @@ const items = [
110118
{label:'Acme Construction'}
111119
];
112120

113-
<SLDSLookup items={items} label="Accounts" type="account" onNewItem={this.newItem} onSearchRecords={this.searchRecords} />
121+
<SLDSLookup
122+
items={items}
123+
label="Account"
124+
type="account"
125+
headerRenderer={SLDSLookup.DefaultHeader}
126+
footerRenderer={SLDSLookup.DefaultFooter}
127+
onChange={this.onChange}
128+
onItemSelect={this.selectItem}
129+
/>
114130

115131
```
116132

@@ -189,7 +205,4 @@ import {SLDSUtilityIcon} from 'design-system-react';
189205
[![browser support](/readme-assets/SLDSDatePickerBase.gif)](/readme-assets/SLDSDatePickerBase.gif)
190206

191207

192-
### Future Pipeline
193-
* Button - stateful variant
194-
* Lookup - multi-select, multi-scope variants
195208

demo/code-snippets/SLDSLookupPage.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ const items = [
99

1010
<SLDSLookup
1111
items={items}
12-
label="Accounts"
12+
label="Account"
1313
type="account"
14-
header={this.getHeader()}
15-
footer={this.getFooter()}
14+
headerRenderer={SLDSLookup.DefaultHeader}
15+
footerRenderer={SLDSLookup.DefaultFooter}
1616
onChange={this.onChange}
17-
onItemSelect={this.onItemSelect} />
18-
17+
onItemSelect={this.selectItem}
18+
/>
1919

0 commit comments

Comments
 (0)