import { Button, Flex, Heading, HStack, Input, Text, useColorModeValue, VStack, } from "@hope-ui/solid" import { useRouter, useT } from "~/hooks" import { JSXElement } from "solid-js" type PasswordProps = { title: string password: () => string setPassword: (s: string) => void enterCallback: () => void children?: JSXElement } const Password = (props: PasswordProps) => { const t = useT() const { back } = useRouter() return ( {props.title} { if (e.key === "Enter") { props.enterCallback() } }} onInput={(e) => props.setPassword(e.currentTarget.value)} /> {props.children} ) } export default Password