mirror of
https://github.com/zadam/trilium.git
synced 2025-11-05 21:05:55 +01:00
feat(react/dialog): port protected session password
This commit is contained in:
@@ -1,17 +1,24 @@
|
||||
import { HTMLInputTypeAttribute } from "preact/compat";
|
||||
|
||||
interface FormTextBoxProps {
|
||||
id?: string;
|
||||
name: string;
|
||||
type?: HTMLInputTypeAttribute;
|
||||
currentValue?: string;
|
||||
className?: string;
|
||||
autoComplete?: string;
|
||||
onChange?(newValue: string): void;
|
||||
}
|
||||
|
||||
export default function FormTextBox({ name, className, currentValue, onChange }: FormTextBoxProps) {
|
||||
export default function FormTextBox({ id, type, name, className, currentValue, onChange, autoComplete }: FormTextBoxProps) {
|
||||
return (
|
||||
<input
|
||||
type="text"
|
||||
type={type ?? "text"}
|
||||
className={`form-control ${className}`}
|
||||
id={id}
|
||||
name={name}
|
||||
value={currentValue}
|
||||
autoComplete={autoComplete}
|
||||
onInput={e => onChange?.(e.currentTarget.value)} />
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user