0
votes

I just started to learn Charkra and i was trying to conect an custom Input based on chakra with the hook-form. But my input are always returning undefined

this is my custom Input `

export const Input = ({...rest}) =>{ return(

        <InputChakra
         {...rest}
         focusBorderColor='black'
         bg="gray.0"
         w={["300px", "300px", "420px", "420px"]}
         h="55px"
         fontSize="xl"
         />
)

}`

and this is my form

<Vstack
                    as="form"
                    onSubmit={handleSubmit(onSubmit)}
                >
                    <Input placeholder="Login" type="text"  {...register("name")}/>
                    <Input  placeholder="Senha" type="password" />
                    <ButtonPrimary type="submit">Logar</ButtonPrimary>
                </VStack>