docs(toast): update

This commit is contained in:
Benjamin Canac
2024-09-27 15:37:26 +02:00
parent d2e075bb4a
commit 6863254d89
15 changed files with 451 additions and 5 deletions

View File

@@ -0,0 +1,19 @@
<script setup lang="ts">
const props = defineProps<{
icon: string
}>()
const toast = useToast()
function showToast() {
toast.add({
title: 'Uh oh! Something went wrong.',
description: 'There was a problem with your request.',
icon: props.icon
})
}
</script>
<template>
<UButton label="Show toast" color="gray" variant="outline" @click="showToast" />
</template>