Skip to content

Commit f2a8b75

Browse files
madsrasmusseniOvergaard
authored andcommitted
docs: add story for readonly uui-combobox
1 parent 2b03861 commit f2a8b75

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

packages/uui-combobox/lib/uui-combobox.story.ts

+32
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ const Template: StoryFn = props => {
113113
valueMod,
114114
renderMod,
115115
disabled,
116+
readonly,
116117
value,
117118
} = props;
118119

@@ -131,6 +132,7 @@ const Template: StoryFn = props => {
131132
@search=${handleSearch}
132133
style="width: 250px"
133134
.disabled=${disabled}
135+
.readonly=${readonly}
134136
.value=${value}>
135137
<uui-combobox-list>
136138
${repeat(filter(options, search), (option: any, index: number) =>
@@ -210,6 +212,36 @@ Disabled.parameters = {
210212
},
211213
};
212214

215+
export const Readonly: StoryFn = Template.bind({});
216+
Readonly.args = {
217+
options: fruits,
218+
filter: basicFilter,
219+
readonly: true,
220+
value: 'banana',
221+
};
222+
Readonly.parameters = {
223+
docs: {
224+
source: {
225+
code: `
226+
<uui-combobox style="width: 250px" readonly>
227+
<uui-combobox-list>
228+
<uui-combobox-list-option style="padding: 8px">
229+
apple
230+
</uui-combobox-list-option>
231+
<uui-combobox-list-option style="padding: 8px">
232+
orange
233+
</uui-combobox-list-option>
234+
<uui-combobox-list-option style="padding: 8px">
235+
lemon
236+
</uui-combobox-list-option>
237+
...
238+
</uui-combobox-list>
239+
</uui-combobox>
240+
`,
241+
},
242+
},
243+
};
244+
213245
export const CustomValue: StoryFn = Template.bind({});
214246
CustomValue.args = {
215247
options: fruits,

0 commit comments

Comments
 (0)