mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-18 05:58:07 +01:00
feat(Notification): support html with title and description slots (#431)
This commit is contained in:
@@ -9,10 +9,14 @@
|
||||
|
||||
<div class="w-0 flex-1">
|
||||
<p :class="ui.title">
|
||||
{{ title }}
|
||||
<slot name="title" :title="title">
|
||||
{{ title }}
|
||||
</slot>
|
||||
</p>
|
||||
<p v-if="description" :class="ui.description">
|
||||
{{ description }}
|
||||
<slot name="description" :description="description">
|
||||
{{ description }}
|
||||
</slot>
|
||||
</p>
|
||||
|
||||
<div v-if="description && actions.length" class="mt-3 flex items-center gap-2">
|
||||
|
||||
@@ -7,7 +7,11 @@
|
||||
:class="notification.click && 'cursor-pointer'"
|
||||
@click="notification.click && notification.click(notification)"
|
||||
@close="toast.remove(notification.id)"
|
||||
/>
|
||||
>
|
||||
<template v-for="(_, name) in $slots" #[name]="slotData">
|
||||
<slot :name="name" v-bind="slotData" />
|
||||
</template>
|
||||
</UNotification>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user