-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(input): add error attribute to display server side errors (#40)
- Loading branch information
Showing
2 changed files
with
72 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ function Template(args) { | |
const { | ||
label, | ||
value, | ||
error, | ||
pattern, | ||
prefix, | ||
suffix, | ||
|
@@ -43,6 +44,7 @@ function Template(args) { | |
return html` | ||
<leu-input | ||
value=${ifDefined(value)} | ||
error=${ifDefined(error)} | ||
pattern=${ifDefined(pattern)} | ||
prefix=${ifDefined(prefix)} | ||
suffix=${ifDefined(suffix)} | ||
|
@@ -116,3 +118,11 @@ Search.args = { | |
size: SIZE_TYPES.SMALL, | ||
icon: "search", | ||
} | ||
|
||
export const CustomError = Template.bind({}) | ||
CustomError.args = { | ||
type: "email", | ||
label: "E-Mail", | ||
value: "[email protected]", | ||
error: "Diese E-Mail Adresse wird bereits verwendet.", | ||
} |