Skip to content

Commit 0886524

Browse files
committed
docs(storybook): ensure that the uui-form story has the right imports
1 parent 40f1f13 commit 0886524

File tree

1 file changed

+36
-15
lines changed

1 file changed

+36
-15
lines changed

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

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ import '@umbraco-ui/uui-slider/lib';
88
import '@umbraco-ui/uui-radio/lib';
99
import '@umbraco-ui/uui-toggle/lib';
1010
import '@umbraco-ui/uui-button/lib';
11+
import '@umbraco-ui/uui-input/lib';
12+
import '@umbraco-ui/uui-input-password/lib';
13+
import '@umbraco-ui/uui-combobox/lib';
14+
import '@umbraco-ui/uui-combobox-list/lib';
15+
import '@umbraco-ui/uui-textarea/lib';
16+
import '@umbraco-ui/uui-select/lib';
1117
import { UUIRadioGroupEvent } from '@umbraco-ui/uui-radio/lib/UUIRadioGroupEvent';
1218
import readme from '../README.md?raw';
1319

@@ -44,6 +50,15 @@ const _onSubmit = (e: SubmitEvent) => {
4450
}
4551
};
4652

53+
const options: Array<Option> = [
54+
{ name: 'Carrot', value: 'orange', selected: true },
55+
{ name: 'Cucumber', value: 'green' },
56+
{ name: 'Aubergine', value: 'purple' },
57+
{ name: 'Blueberry', value: 'Blue' },
58+
{ name: 'Banana', value: 'yellow' },
59+
{ name: 'Strawberry', value: 'red' },
60+
];
61+
4762
// TODO: Find a good way to have stories with both HTML and javascript
4863
export const Overview: Story = () => {
4964
return html`
@@ -105,9 +120,9 @@ export const Overview: Story = () => {
105120
</uui-form-layout-item>
106121
107122
<uui-form-layout-item>
108-
<uui-label for="MyPasswordInput" slot="label" required
109-
>Password</uui-label
110-
>
123+
<uui-label for="MyPasswordInput" slot="label" required>
124+
Password
125+
</uui-label>
111126
<uui-input-password
112127
id="MyPasswordInput"
113128
name="password"
@@ -143,22 +158,28 @@ export const Overview: Story = () => {
143158
</uui-textarea>
144159
</uui-form-layout-item>
145160
161+
<uui-form-layout-item>
162+
<uui-label for="MySelect" slot="label" required>Select</uui-label>
163+
<uui-select id="MySelect" name="select" required .options=${options}>
164+
</uui-select>
165+
</uui-form-layout-item>
166+
146167
<uui-form-layout-item>
147168
<uui-label for="MyCombobox" slot="label" required>Combobox</uui-label>
148169
<uui-combobox id="MyCombobox" name="combobox" required>
149170
<uui-combobox-list>
150-
<uui-combobox-list-option value="1"
151-
>Option 1</uui-combobox-list-option
152-
>
153-
<uui-combobox-list-option value="2"
154-
>Option 2</uui-combobox-list-option
155-
>
156-
<uui-combobox-list-option value="3"
157-
>Option 3</uui-combobox-list-option
158-
>
159-
<uui-combobox-list-option value="4"
160-
>Option 4</uui-combobox-list-option
161-
>
171+
<uui-combobox-list-option value="1">
172+
Option 1
173+
</uui-combobox-list-option>
174+
<uui-combobox-list-option value="2">
175+
Option 2
176+
</uui-combobox-list-option>
177+
<uui-combobox-list-option value="3">
178+
Option 3
179+
</uui-combobox-list-option>
180+
<uui-combobox-list-option value="4">
181+
Option 4
182+
</uui-combobox-list-option>
162183
</uui-combobox-list>
163184
</uui-combobox>
164185
</uui-form-layout-item>

0 commit comments

Comments
 (0)