Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit 75944b4

Browse files
committed
Close button for notifications
1 parent 5b385ce commit 75944b4

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

src/tw-notification.vue

+19-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,25 @@
22
<div class="tw-notification-container">
33
<transition-group name="tw-notification" tag="div">
44
<div class="tw-notification" v-for="n in notifications" :key="n.id">
5-
<div class="tw-notification-title">{{ n.title }}</div>
5+
<div class="tw-notification-header">
6+
<div class="tw-notification-title">{{ n.title }}</div>
7+
<div class="tw-notification-close"><slot name="close">
8+
<svg
9+
xmlns="http://www.w3.org/2000/svg"
10+
width="24"
11+
height="24"
12+
viewBox="0 0 24 24"
13+
fill="none"
14+
stroke="currentColor"
15+
stroke-width="2"
16+
stroke-linecap="round"
17+
stroke-linejoin="round"
18+
>
19+
<line x1="18" y1="6" x2="6" y2="18"></line>
20+
<line x1="6" y1="6" x2="18" y2="18"></line>
21+
</svg>
22+
</slot></div>
23+
</div>
624
<div class="tw-notification-message">{{ n.message }}</div>
725
</div>
826
</transition-group>

0 commit comments

Comments
 (0)