Skip to content

Commit

Permalink
feat: support type="password" for textbox component
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbert committed Aug 9, 2021
1 parent 64e57bd commit 2a1b0a0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions components/textbox/html.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
.utrecht-html {
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"] {
Expand Down
18 changes: 17 additions & 1 deletion components/textbox/html.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const Template = ({
type: {
description: "Type",
control: "select",
options: ["email", "search", "tel", "text", "url"],
options: ["email", "search", "password", "tel", "text", "url"],
},
value: {
description: "Set the value of the text box",
Expand Down Expand Up @@ -141,3 +141,19 @@ Styling via the `<input>` element:
{Template.bind({})}
</Story>
</Canvas>

## Password input

<Canvas>
<Story
name="Password input"
args={{
autoComplete: "current-password",
required: true,
value: "very$ecret2021",
type: "password",
}}
>
{Template.bind({})}
</Story>
</Canvas>

0 comments on commit 2a1b0a0

Please sign in to comment.