mirror of
https://github.com/zadam/trilium.git
synced 2025-11-07 13:56:11 +01:00
feat(react/dialogs): port the rest of confirm
This commit is contained in:
@@ -1,14 +1,20 @@
|
||||
interface FormCheckboxProps {
|
||||
name: string;
|
||||
label: string;
|
||||
currentValue?: boolean;
|
||||
/**
|
||||
* If set, the checkbox label will be underlined and dotted, indicating a hint. When hovered, it will show the hint text.
|
||||
*/
|
||||
hint?: string;
|
||||
currentValue: boolean;
|
||||
onChange(newValue: boolean): void;
|
||||
}
|
||||
|
||||
export default function FormCheckbox({ name, label, currentValue, onChange }: FormCheckboxProps) {
|
||||
export default function FormCheckbox({ name, label, currentValue, onChange, hint }: FormCheckboxProps) {
|
||||
return (
|
||||
<div className="form-check">
|
||||
<label className="form-check-label tn-checkbox">
|
||||
<label
|
||||
className="form-check-label tn-checkbox"
|
||||
style={hint && { textDecoration: "underline dotted var(--main-text-color)" }} title={hint}>
|
||||
<input
|
||||
className="form-check-input"
|
||||
type="checkbox"
|
||||
|
||||
Reference in New Issue
Block a user