shadcn-vue/apps/www/src/lib/registry/default/example/ToastDemo.vue
Nik ef4609abbf
feat: add toast (#122)
* feat: add toast

* feat: add new york version

* feat: add `VNode` type to toast description

* docs: use `toast` in form demos

* chore: run build registry

* docs: update announcement component, menu label

* refactor: change 'onUpdate:open' to 'onOpenChange' a more friendlier name

---------

Co-authored-by: Nik <dev@nkutinha.slmail.me>
Co-authored-by: Sadegh Barati <sadeghbaratiwork@gmail.com>
Co-authored-by: zernonia <zernonia@gmail.com>
2023-11-03 09:45:40 +08:00

20 lines
430 B
Vue

<script setup lang="ts">
import { Button } from '@/lib/registry/default/ui/button'
import { useToast } from '@/lib/registry/default/ui/toast/use-toast'
const { toast } = useToast()
</script>
<template>
<Button
variant="outline" @click="() => {
toast({
title: 'Scheduled: Catch up',
description: 'Friday, February 10, 2023 at 5:57 PM',
});
}"
>
Add to calander
</Button>
</template>