mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 08:15:52 +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)} />
|
||||
);
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import type { CSSProperties } from "preact/compat";
|
||||
interface ModalProps {
|
||||
className: string;
|
||||
title: string | ComponentChildren;
|
||||
size: "lg" | "sm";
|
||||
size: "lg" | "md" | "sm";
|
||||
children: ComponentChildren;
|
||||
footer?: ComponentChildren;
|
||||
maxWidth?: number;
|
||||
|
||||
Reference in New Issue
Block a user