mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-28 19:28:11 +08:00
Add support for clicking checkboxes via their labels (#2667)
This commit is contained in:
@@ -12,11 +12,13 @@
|
||||
export let disabled = false;
|
||||
export let icon: IconName = "Checkmark";
|
||||
export let tooltip: string | undefined = undefined;
|
||||
export let forLabel: bigint | undefined = undefined;
|
||||
|
||||
let inputElement: HTMLInputElement | undefined;
|
||||
|
||||
let id = String(Math.random()).substring(2);
|
||||
const backupId = String(Math.random()).substring(2);
|
||||
|
||||
$: id = forLabel !== undefined ? String(forLabel) : backupId;
|
||||
$: displayIcon = (!checked && icon === "Checkmark" ? "Empty12px" : icon) as IconName;
|
||||
|
||||
export function isChecked() {
|
||||
|
||||
Reference in New Issue
Block a user