Skip to content

Commit

Permalink
replaced Button component with simple button
Browse files Browse the repository at this point in the history
  • Loading branch information
werdnanoslen committed Oct 5, 2023
1 parent d9d21af commit 9f9d03b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/components/forms/Form/Form.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,17 +236,16 @@ export const signInForm = (): React.ReactElement => {
name="password-sign-in"
type={showPassword ? 'text' : 'password'}
/>
<Button
<button
title="Show password"
type="button"
unstyled
className="usa-show-password"
aria-controls="password-sign-in"
onClick={(): void =>
setShowPassword((showPassword) => !showPassword)
}>
{showPassword ? 'Hide password' : 'Show password'}
</Button>
</button>

<Button type="submit">Sign in</Button>
<p>
Expand Down
5 changes: 2 additions & 3 deletions src/stories/templates/createaccount.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,17 +204,16 @@ export const CreateAccount = (): React.ReactElement => {
required={true}
/>

<Button
<button
title="Show password"
type="button"
unstyled
className="usa-show-password"
aria-controls="password-create-account password-create-account-confirm"
onClick={(): void =>
setShowPassword((showPassword) => !showPassword)
}>
{showPassword ? 'Hide password' : 'Show password'}
</Button>
</button>

<Label htmlFor="password-create-account-confirm">
Re-type password{' '}
Expand Down
5 changes: 2 additions & 3 deletions src/stories/templates/signin.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,16 @@ export const SignIn = (): React.ReactElement => {
required={true}
/>

<Button
<button
title="Show password"
type="button"
unstyled
className="usa-show-password"
aria-controls="password-create-account password-create-account-confirm"
onClick={(): void =>
setShowPassword((showPassword) => !showPassword)
}>
{showPassword ? 'Hide password' : 'Show password'}
</Button>
</button>

<Button type="submit">Sign in</Button>

Expand Down

0 comments on commit 9f9d03b

Please sign in to comment.