feat(react/dialogs): port the rest of confirm

This commit is contained in:
Elian Doran
2025-08-05 15:13:09 +03:00
parent 93fae9cc8c
commit 8f0a9f91c1
2 changed files with 46 additions and 12 deletions

View File

@@ -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"