chore(SW-360): move password form types
This commit is contained in:
@@ -14,16 +14,15 @@ import {
|
||||
} from "@/components/Icons"
|
||||
import AriaInputWithLabel from "@/components/TempDesignSystem/Form/Input/AriaInputWithLabel"
|
||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||
import {
|
||||
PasswordValidatorKey,
|
||||
passwordValidators,
|
||||
} from "@/utils/passwordValidator"
|
||||
import { passwordValidators } from "@/utils/passwordValidator"
|
||||
|
||||
import Button from "../../Button"
|
||||
import { IconProps, type NewPasswordProps } from "./newPassword"
|
||||
|
||||
import styles from "./newPassword.module.css"
|
||||
|
||||
import { PasswordValidatorKey } from "@/types/components/form/newPassword"
|
||||
|
||||
export default function NewPassword({
|
||||
name = "newPassword",
|
||||
"aria-label": ariaLabel,
|
||||
|
||||
3
types/components/form/newPassword.ts
Normal file
3
types/components/form/newPassword.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { passwordValidators } from "@/utils/passwordValidator"
|
||||
|
||||
export type PasswordValidatorKey = keyof typeof passwordValidators
|
||||
@@ -25,8 +25,6 @@ export const passwordValidators = {
|
||||
},
|
||||
}
|
||||
|
||||
export type PasswordValidatorKey = keyof typeof passwordValidators
|
||||
|
||||
export const passwordValidator = (msg = "Required field") =>
|
||||
z
|
||||
.string()
|
||||
|
||||
Reference in New Issue
Block a user