diff --git a/app/components/auth/form/password-input.tsx b/app/components/auth/form/password-input.tsx new file mode 100644 index 0000000..71cd84b --- /dev/null +++ b/app/components/auth/form/password-input.tsx @@ -0,0 +1,39 @@ +import { useState } from 'react'; +import { Lock } from 'lucide-react'; +import { Button } from '~/components/ui/button'; +import { IconInput } from '~/components/ui/icon-input'; +import { InlineMessage } from '~/components/ui/inline-message'; +import type { InputProps } from '~/components/ui/input'; + +export function PasswordInput(props: Omit) { + const [visible, setVisible] = useState(false); + const [capsLock, setCapsLock] = useState(false); + + return ( + <> + setCapsLock(e.getModifierState('CapsLock'))} + trailing={ + + } + {...props} + onBlur={(e) => { + setCapsLock(false); + props.onBlur?.(e); + }} + /> + {capsLock && Caps Lock is on} + + ); +}