This commit is contained in:
Timothy Jaeryang Baek committed 2026-06-29 03:20:02 -05:00
1 parent 33cd199e6d
commit c93d4f04aa
1 file changed
+10 -14
+10 -14
View File
@@ -55,7 +55,14 @@
export let onChange: Function = () => {}; export let onChange: Function = () => {};
$: onChange(open); const toggleOpen = () => {
if (disabled) {
return;
}
open = !open;
onChange(open);
};
const collapsibleId = uuidv4(); const collapsibleId = uuidv4();
</script> </script>
@@ -64,14 +71,7 @@
{#if title !== null} {#if title !== null}
<!-- svelte-ignore a11y-no-static-element-interactions --> <!-- svelte-ignore a11y-no-static-element-interactions -->
<!-- svelte-ignore a11y-click-events-have-key-events --> <!-- svelte-ignore a11y-click-events-have-key-events -->
<div <div class="{buttonClassName} {disabled ? '' : 'cursor-pointer'}" on:pointerup={toggleOpen}>
class="{buttonClassName} {disabled ? '' : 'cursor-pointer'}"
on:pointerup={() => {
if (!disabled) {
open = !open;
}
}}
>
<div <div
class=" w-full flex items-center justify-between gap-2 {attributes?.done && class=" w-full flex items-center justify-between gap-2 {attributes?.done &&
attributes?.done !== 'true' && attributes?.done !== 'true' &&
@@ -135,11 +135,7 @@
on:click={(e) => { on:click={(e) => {
e.stopPropagation(); e.stopPropagation();
}} }}
on:pointerup={(e) => { on:pointerup={toggleOpen}
if (!disabled) {
open = !open;
}
}}
> >
<div> <div>
<div class="flex items-start justify-between"> <div class="flex items-start justify-between">