mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
Co-authored-by: Daniel Roe <daniel@roe.dev> Co-authored-by: Sébastien Chopin <seb@nuxt.com>
12 lines
254 B
Vue
12 lines
254 B
Vue
<script setup>
|
|
const toast = useToast()
|
|
|
|
function onCallback () {
|
|
alert('Notification expired!')
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<UButton label="Show toast" @click="toast.add({ title: 'Expires soon...', timeout: 1000, callback: onCallback })" />
|
|
</template>
|