docs: include Toaster component in toast.md usage (#479)

This commit is contained in:
LeeChan 2024-04-11 19:51:16 +08:00 committed by GitHub
parent e36402491b
commit 11d77fb9a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,11 +45,13 @@ import { useToast } from '@/components/ui/toast/use-toast'
<script setup lang="ts"> <script setup lang="ts">
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { useToast } from '@/components/ui/toast/use-toast' import { useToast } from '@/components/ui/toast/use-toast'
import { Toaster } from "@/components/ui/toast"
const { toast } = useToast() const { toast } = useToast()
</script> </script>
<template> <template>
<Toaster />
<Button <Button
@click="() => { @click="() => {
toast({ toast({