Skip to content

Commit 657efcf

Browse files
author
Lesley
committed
docs: Add options to playground
1 parent 93a7349 commit 657efcf

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/src/stories/Options/index.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ class WithOptions extends PureComponent {
2020
disabled: false,
2121
readOnly: false,
2222
hierarchical: false,
23+
placeholderText: 'Choose...',
24+
inlinePlaceholderText: 'Search...',
2325
}
2426
}
2527

@@ -48,6 +50,8 @@ class WithOptions extends PureComponent {
4850
readOnly,
4951
showDropdown,
5052
inlineSearchInput,
53+
placeholderText,
54+
inlinePlaceholderText,
5155
} = this.state
5256

5357
return (
@@ -83,6 +87,22 @@ class WithOptions extends PureComponent {
8387
<option value="always">Always</option>
8488
</select>
8589
</div>
90+
<div style={{ marginBottom: '10px' }}>
91+
<label htmlFor="placeholderText">Placeholder text: </label>
92+
<input
93+
id="placeholderText"
94+
value={placeholderText}
95+
onChange={e => this.setState({ placeholderText: e.target.value })}
96+
/>
97+
</div>
98+
<div style={{ marginBottom: '10px' }}>
99+
<label htmlFor="inlinePlaceholderText">Inline placeholder text: </label>
100+
<input
101+
id="inlinePlaceholderText"
102+
value={inlinePlaceholderText}
103+
onChange={e => this.setState({ inlinePlaceholderText: e.target.value })}
104+
/>
105+
</div>
86106
<Checkbox
87107
label="Inline Search Input"
88108
value="inlineSearchInput"
@@ -130,6 +150,8 @@ class WithOptions extends PureComponent {
130150
showPartiallySelected={showPartiallySelected}
131151
disabled={disabled}
132152
readOnly={readOnly}
153+
placeholder={placeholderText}
154+
inlineSearchPlaceholder={inlinePlaceholderText}
133155
inlineSearchInput={inlineSearchInput}
134156
showDropdown={showDropdown}
135157
texts={{ label: 'Demo Dropdown' }}

0 commit comments

Comments
 (0)