import React, { useState } from "react" import * as S from "./styles" import { TextInputProps } from "./interface" const TextInput:React.FC = ({ label, className, onChange, disabled, placeholder, name, type, value }) => { const [valueSelected, setValueSelected] = useState(value) const changeValue = (event: any) => { const { value } = event.target setValueSelected(value) onChange(event) } return ( {label} changeValue(event)} /> ) } export default TextInput