Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: changed template links to buttons #2526

Merged
merged 9 commits into from
Oct 5, 2023
42 changes: 19 additions & 23 deletions src/components/forms/Form/Form.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,18 +236,16 @@ export const signInForm = (): React.ReactElement => {
name="password-sign-in"
type={showPassword ? 'text' : 'password'}
/>
<p className="usa-form__note">
<a
title="Show password"
href="javascript:void(0);"
className="usa-show-password"
aria-controls="password-sign-in"
onClick={(): void =>
setShowPassword((showPassword) => !showPassword)
}>
{showPassword ? 'Hide password' : 'Show password'}
</a>
</p>
<button
title="Show password"
type="button"
className="usa-show-password"
aria-controls="password-sign-in"
onClick={(): void =>
setShowPassword((showPassword) => !showPassword)
}>
{showPassword ? 'Hide password' : 'Show password'}
</button>

<Button type="submit">Sign in</Button>
<p>
Expand Down Expand Up @@ -290,17 +288,15 @@ export const passwordResetForm = (): React.ReactElement => {
name="confirmPassword"
type={showPassword ? 'text' : 'password'}
/>
<p className="usa-form__note">
<a
href="javascript:void(0);"
className="usa-show-multipassword"
aria-controls="newPassword confirmPassword"
onClick={(): void =>
setShowPassword((showPassword) => !showPassword)
}>
{showPassword ? 'Hide my typing' : 'Show my typing'}
</a>
</p>
<button
type="button"
className="usa-show-password"
aria-controls="newPassword confirmPassword"
onClick={(): void =>
setShowPassword((showPassword) => !showPassword)
}>
{showPassword ? 'Hide my typing' : 'Show my typing'}
</button>

<Button type="submit">Reset password</Button>
</Fieldset>
Expand Down
22 changes: 10 additions & 12 deletions src/stories/templates/createaccount.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,18 +204,16 @@ export const CreateAccount = (): React.ReactElement => {
required={true}
/>

<p className="usa-form__note">
<a
title="Show password"
href="javascript:void(0);"
className="usa-show-password"
aria-controls="password-create-account password-create-account-confirm"
onClick={(): void =>
setShowPassword((showPassword) => !showPassword)
}>
{showPassword ? 'Hide password' : 'Show password'}
</a>
</p>
<button
title="Show password"
type="button"
className="usa-show-password"
aria-controls="password-create-account password-create-account-confirm"
onClick={(): void =>
setShowPassword((showPassword) => !showPassword)
}>
{showPassword ? 'Hide password' : 'Show password'}
</button>

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

<p className="usa-form__note">
<a
title="Show password"
href="javascript:void(0);"
className="usa-show-password"
aria-controls="password-create-account password-create-account-confirm"
onClick={(): void =>
setShowPassword((showPassword) => !showPassword)
}>
{showPassword ? 'Hide password' : 'Show password'}
</a>
</p>
<button
title="Show password"
type="button"
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 type="submit">Sign in</Button>

Expand Down
Loading