* 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>
20 lines
436 B
Vue
20 lines
436 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: 'Uh oh! Something went wrong.',
|
|
description: 'There was a problem with your request.',
|
|
});
|
|
}"
|
|
>
|
|
Show Toast
|
|
</Button>
|
|
</template>
|