Files
Trilium/apps/client/src/widgets/react/FormTextBox.tsx

17 lines
474 B
TypeScript
Raw Normal View History

2025-08-03 21:18:18 +03:00
interface FormTextBoxProps {
name: string;
currentValue?: string;
className?: string;
onChange?(newValue: string): void;
}
2025-08-04 21:17:35 +03:00
export default function FormTextBox({ name, className, currentValue, onChange }: FormTextBoxProps) {
2025-08-03 21:18:18 +03:00
return (
2025-08-04 21:17:35 +03:00
<input
type="text"
className={`form-control ${className}`}
name={name}
value={currentValue}
onInput={e => onChange?.(e.currentTarget.value)} />
2025-08-03 21:18:18 +03:00
);
}