feat(react/dialog): port protected session password

This commit is contained in:
Elian Doran
2025-08-04 23:22:45 +03:00
parent beb0487513
commit 134c869b07
12 changed files with 68 additions and 71 deletions

View File

@@ -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)} />
);
}