Skip to content

Commit 63c17d9

Browse files
committed
docs(uui-input): add custom render to validation stories to support custom validation
otherwise Storybook catches all events and ignores our own event handlers
1 parent a5d0c14 commit 63c17d9

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ export const AAAOverview: Story = {
6464
};
6565

6666
export const PatternAndInputmode: Story = {
67+
render: props => html`
68+
<uui-input
69+
.placeholder=${props.placeholder}
70+
.inputMode=${props.inputMode}
71+
.pattern=${props.pattern}
72+
.errorMessage=${props.errorMessage}>
73+
</uui-input>
74+
`,
6775
args: {
6876
placeholder: 'Enter email',
6977
inputMode: 'email',
@@ -73,6 +81,14 @@ export const PatternAndInputmode: Story = {
7381
};
7482

7583
export const MinMaxLength: Story = {
84+
render: props => html`
85+
<uui-input
86+
.minlength=${props.minlength}
87+
.maxlength=${props.maxlength}
88+
.minlengthMessage=${props.minlengthMessage}
89+
.maxlengthMessage=${props.maxlengthMessage}>
90+
</uui-input>
91+
`,
7692
args: {
7793
minlength: 3,
7894
maxlength: 4,

0 commit comments

Comments
 (0)