Skip to content

Commit 05a7c68

Browse files
Merge pull request #152 from sedmedgh/main
feat: add isPaused prop to headlessToast for custom progressBars
2 parents 70f19b1 + e5ac2bf commit 05a7c68

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

app/components/HeadlessToast.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<script setup lang="ts">
22
import { toast } from '@/packages'
33
4-
defineProps<{ msg?: string }>()
4+
defineProps<{ msg?: string; isPaused?: boolean }>()
55
</script>
66

77
<template>
88
<div class="headless">
99
<p class="headlessTitle">Event Created {{ msg }}</p>
1010
<p class="headlessDescription">Today at 4:00pm - "Louvre Museum"</p>
11+
<p class="headlessDescription">is Paused : {{isPaused}}</p>
1112
<button class="headlessCloseAll" @click="toast.dismiss()">
1213
Close all
1314
</button>

src/packages/Toast.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
:is="toast.component"
7272
v-bind="toast.componentProps"
7373
:onCloseToast="handleCloseToast"
74+
:isPaused="$props.expanded || $props.interacting || isDocumentHidden"
7475
/>
7576
</template>
7677

0 commit comments

Comments
 (0)