import * as React from "react"; export const PasswordForm = () => { const [password, setPassword] = React.useState(""); const [visible, setVisible] = React.useState(false); return ( <> setPassword(e.target.value)} /> setVisible(!visible)} /> > ); }; import * as React from "react"; type Props = { password: string; onChange?: (event: React.ChangeEvent) => void; }; export const PasswordForm = ({ password, onChange }: Props) => { const [visible, setVisible] = React.useState(false); return ( <> setVisible(!visible)} /> > ); };