Skip to content

Commit 23a6607

Browse files
committed
use uui-form to highlight its existence and purpose
1 parent 784ae8e commit 23a6607

File tree

1 file changed

+57
-55
lines changed

1 file changed

+57
-55
lines changed

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

Lines changed: 57 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -22,59 +22,61 @@ export const AAAOverview: Story = () => html`
2222
`;
2323
AAAOverview.storyName = 'Overview';
2424

25-
export const Example: Story = () => html` <form
26-
is="uui-form"
27-
style="max-width: 800px;">
28-
<uui-form-layout-item>
29-
<uui-label slot="label" for="phoneInput" required>Phone number</uui-label>
30-
<span slot="description"
31-
>Form item accepts a description, keep it short.</span
32-
>
33-
<div>
34-
<uui-input
35-
id="phoneInput"
36-
type="text"
37-
name="phone"
38-
placeholder="+00"
39-
required
40-
required-message="You must enter a area code"
41-
style="text-align:right; width: 75px;">
42-
</uui-input>
43-
<uui-input
44-
type="text"
45-
name="phone"
46-
placeholder=""
47-
required
48-
required-message="You must enter a phone number">
49-
</uui-input>
50-
</div>
51-
</uui-form-layout-item>
52-
<uui-form-layout-item>
53-
<uui-label slot="label" for="cityinput">City</uui-label>
54-
<span slot="description"></span>
55-
<div>
56-
<uui-input
57-
id="cityinput"
58-
type="text"
59-
name="phone"
60-
placeholder=""
61-
required
62-
required-message="You must enter a city">
63-
</uui-input>
64-
</div>
65-
</uui-form-layout-item>
66-
<uui-form-layout-item>
67-
<div>
68-
<uui-input
69-
type="text"
70-
name="postal"
71-
placeholder=""
72-
required
73-
required-message="You must enter a postal number">
74-
</uui-input>
75-
</div>
76-
</uui-form-layout-item>
25+
export const Example: Story = () => html` <uui-form>
26+
<form is="uui-form" style="max-width: 800px;">
27+
<uui-form-layout-item>
28+
<uui-label slot="label" for="phoneInput" required>Phone number</uui-label>
29+
<span slot="description"
30+
>Form item accepts a description, keep it short.</span
31+
>
32+
<div>
33+
<uui-input
34+
id="phoneInput"
35+
type="text"
36+
name="phone"
37+
placeholder="+00"
38+
required
39+
required-message="You must enter a area code"
40+
style="text-align:right; width: 75px;">
41+
</uui-input>
42+
<uui-input
43+
type="text"
44+
name="phone"
45+
placeholder=""
46+
required
47+
required-message="You must enter a phone number">
48+
</uui-input>
49+
</div>
50+
</uui-form-layout-item>
51+
<uui-form-layout-item>
52+
<uui-label slot="label" for="cityinput">City</uui-label>
53+
<span slot="description"></span>
54+
<div>
55+
<uui-input
56+
id="cityinput"
57+
type="text"
58+
name="phone"
59+
placeholder=""
60+
required
61+
required-message="You must enter a city">
62+
</uui-input>
63+
</div>
64+
</uui-form-layout-item>
65+
<uui-form-layout-item>
66+
<div>
67+
<uui-input
68+
type="text"
69+
name="postal"
70+
placeholder=""
71+
required
72+
required-message="You must enter a postal number">
73+
</uui-input>
74+
</div>
75+
</uui-form-layout-item>
7776
78-
<uui-button type="reset" label="Reset" look="secondary"> Reset </uui-button>
79-
<uui-button type="submit" label="Submit" look="positive"> Submit </uui-button>
80-
</form>`;
77+
<uui-button type="reset" label="Reset" look="secondary"> Reset </uui-button>
78+
<uui-button type="submit" label="Submit" look="positive">
79+
Submit
80+
</uui-button>
81+
</form>
82+
</uui-form>`;

0 commit comments

Comments
 (0)