import { Box, Flex, FormLabel, Input, Spacer } from "@chakra-ui/react" import { Hide, Show } from "@chakra-ui/react" import React, { useEffect, useState } from "react" /** * Component used to generate a form input * props - * label * inputtype * placeholder * onChange = the handler function to get the changed data */ export default function FormLabelInput(props) { const [data, setData] = React.useState("") const handlepassChange = (data) => { props.onChange(data) } useEffect(() => { handlepassChange(data) }) return ( {props.label} { setData(e.target.value) }} /> ) }