import { PropsWithChildren, useState } from 'react'; import { UseFormRegister } from 'react-hook-form'; import { IconButton, Input, InputGroup, InputRightElement } from '@chakra-ui/react'; import { IoEyeOutline } from '@react-icons/all-files/io5/IoEyeOutline'; import { Settings } from 'ontime-types'; interface GeneralPinInputProps { register: UseFormRegister; formName: keyof Settings; isDisabled?: boolean; } export default function GeneralPinInput(props: PropsWithChildren) { const { register, formName, isDisabled } = props; const [isVisible, setVisible] = useState(false); return ( setVisible(true)} onMouseUp={() => setVisible(false)} size='sm' variant='ontime-ghosted' icon={} aria-label='Show pin code' /> ); }