Skip to content

Commit 00eec16

Browse files
committed
feat: allow clearing selected icon in icon picker
1 parent 1cb80c2 commit 00eec16

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

resources/assets/editor/components/IconPicker.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
:close-on-interact-outside="false"
6868
@open-change="isDirty = false; initialValue = model"
6969
>
70-
<Dialog.Trigger class="flex items-center px-3 py-2.5 gap-4 border rounded ">
70+
<Dialog.Trigger class="flex items-center px-3 py-2.5 gap-4 border rounded relative">
7171
<span
7272
v-if="selectedIcon"
7373
v-html="selectedIcon.svg"
@@ -77,6 +77,14 @@
7777
v-else
7878
class="w-8 h-8 text-gray-600"
7979
/>
80+
81+
<button
82+
v-if="selectedIcon"
83+
class="absolute -top-2 -right-2 bg-zinc-100 rounded-full p-1 hover:bg-zinc-200"
84+
@click.stop="model = null"
85+
>
86+
<i-heroicons-x-mark class="w-4 h-4" />
87+
</button>
8088
</Dialog.Trigger>
8189
<Dialog.Positioner class="flex fixed z-50 top-14 left-14 bottom-0 w-[19.9rem] items-center justify-center">
8290
<Dialog.Content class="bg-white shadow flex flex-col w-full h-full overflow-hidden">

0 commit comments

Comments
 (0)