mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 11:56:01 +01:00
feat(react): port sort child notes
This commit is contained in:
25
apps/client/src/widgets/react/FormTextBox.tsx
Normal file
25
apps/client/src/widgets/react/FormTextBox.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
interface FormTextBoxProps {
|
||||
name: string;
|
||||
label: string;
|
||||
currentValue?: string;
|
||||
className?: string;
|
||||
description?: string;
|
||||
onChange?(newValue: string): void;
|
||||
}
|
||||
|
||||
export default function FormTextBox({ name, label, description, className, currentValue, onChange }: FormTextBoxProps) {
|
||||
return (
|
||||
<div className={className}>
|
||||
<label>
|
||||
{label}
|
||||
<input
|
||||
type="text"
|
||||
className="form-control"
|
||||
name={name}
|
||||
value={currentValue}
|
||||
onInput={e => onChange?.(e.currentTarget.value)} />
|
||||
{description && <small className="form-text text-muted">{description}</small>}
|
||||
</label>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user