chore(Notifications): simplify how to position them (#190)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Sébastien Chopin
2023-05-19 10:01:43 +02:00
committed by GitHub
parent fa59ea9d83
commit 1743ea91d5
3 changed files with 17 additions and 4 deletions

View File

@@ -6,8 +6,6 @@ github: true
First of all, add the `Notifications` component to your app, preferably inside `app.vue`.
This component will render by default the notifications at the bottom right of the screen. You can configure its behaviour in the `app.config.ts` through `ui.notifications`.
```vue [app.vue]
<template>
<div>
@@ -37,6 +35,19 @@ const toast = useToast()
```
::
This component will render by default the notifications at the bottom right of the screen. You can configure its behaviour in the `app.config.ts` through `ui.notifications`:
```ts [app.config.ts]
export default defineAppConfig({
ui: {
notifications: {
// Show toasts at the top right of the screen
position: 'top-0 right-0'
}
}
})
```
### Description
You can add a `description` in addition of the `title`.