import { JSX, splitProps, createSignal, Show } from "solid-js"; import Input, { InputProps } from "./Input"; import Eye from "~/components/icons/Eye"; import EyeSlash from "~/components/icons/EyeSlash"; import PasswordStrengthMeter from "~/components/PasswordStrengthMeter"; export interface PasswordInputProps extends Omit { showStrength?: boolean; defaultVisible?: boolean; passwordValue?: string; } export default function PasswordInput(props: PasswordInputProps) { const [local, inputProps] = splitProps(props, [ "showStrength", "defaultVisible", "passwordValue", "class", "containerClass" ]); const [showPassword, setShowPassword] = createSignal( local.defaultVisible || false ); return (
{local.showStrength && local.passwordValue !== undefined && ( )}
); }