import { forwardRef, useId, useImperativeHandle, useRef } from 'react' import InputLabel from './Label' import './styles/Label.css' import './styles/Text.css' export interface HandleForInputText { getValue(): string } interface PropsForInputTags { label: string placeholder: string } const InputText = forwardRef(({ label, placeholder }, ref) => { const componentID = useId() const inputRef = useRef(null) useImperativeHandle(ref, () => ({ getValue: () => inputRef.current?.value ?? '', })) return ( <> {label && } ) }) export default InputText