import React, {ChangeEvent} from 'react' import {v4 as uuid} from 'uuid' export type Props = React.DetailedHTMLProps, HTMLInputElement> & { label?: string } const ButtonBase: React.ForwardRefRenderFunction = (props, ref) => { const { className = '', onChange, label, ...rest } = props const inputRef = (ref as any) || React.createRef() const handleChange = (e: ChangeEvent) => { if (!onChange) return onChange(e) } const id = uuid() return ( {label ?? } ) } export const Input = React.forwardRef(ButtonBase)