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