import React, { ChangeEvent } from "react"; interface Props { value: string; onChange: (value: string) => void; placeholder?: string; label?: string; } export const TextInput: React.FC = ({ value, onChange, placeholder, label, }) => { const handleInputChange = (event: ChangeEvent) => { const newValue = event.target.value; // Only allow numbers or strings if (/^[0-9a-zA-Z]*$/.test(newValue)) { onChange(newValue); } }; return (
); };