Skip to content

Commit 91d32f4

Browse files
committed
fix import modal not reopening when closing
1 parent a551cbf commit 91d32f4

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/routes/design/Upload.svelte

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@
112112
ondragexit={handleDragOut}
113113
ondragleave={handleDragOut}
114114
>
115-
<form method="dialog">
116-
<button
117-
aria-label="Close modal"
118-
class="absolute text-subtext0 hover:text-text bg-transparent top-4 right-4 rounded-full"
119-
><div class="i-mingcute-close-circle-line size-6"></div></button
120-
>
121-
</form>
115+
<button
116+
aria-label="Close modal"
117+
class="absolute text-subtext0 hover:text-text bg-transparent top-4 right-4 rounded-full"
118+
onclick={() => (isOpen = false)}
119+
><div class="i-mingcute-close-circle-line size-6"></div></button
120+
>
121+
122122
<div class="flex flex-col mt-2 gap1">
123123
<h1 class="font-bold text-rosewater">Import colors 🎨</h1>
124124
<p class="max-w-[60ch]">
@@ -171,9 +171,8 @@
171171
{/if}
172172

173173
<div class="flex gap-6">
174-
<form method="dialog">
175-
<Button variant="link" class="mt-6">Cancel</Button>
176-
</form>
174+
<Button variant="link" class="mt-6" onclick={() => (isOpen = false)}>Cancel</Button>
175+
177176
<Button
178177
onclick={() => {
179178
if (!importedColors) return

0 commit comments

Comments
 (0)