diff --git a/packages/core/docs/guide/composables.md b/packages/core/docs/guide/composables.md index 3715fe57e2..3cf9f21b97 100644 --- a/packages/core/docs/guide/composables.md +++ b/packages/core/docs/guide/composables.md @@ -435,40 +435,3 @@ module.exports = { ``` The custom query function always has in the arguments the default query and default variables and must return the query and its variables as well. In the body you can do anything you want with those parameters - you can override them or even change to the new ones. - -## In-app Notifications - -In Vue Storefront we're providing Notifications system based on composable `useUiNotification`. - -Shows notifications after some actions being performed in the shop. There are three types of notifications: danger, success and info. - -There is a dedicated interface for `useUiNotification`: - -```ts -interface UseUiNotification { - message: string; - type: 'danger' | 'success' | 'info'; - action?: { text: string; onClick: () => void }; - icon?: string; - persist?: boolean; - id?: symbol; - dismiss?: () => void; -} -``` - -### How to send notification? - -To send a new notification you need to only import `useUiNotification` from composables and pass `type` and `message` to `send` function. Rest parameters are optional. - -```js -import { useUiNotification } from '~/composables'; - -setup() { - const { send } = useUiNotification(); - - send({ - type: 'success', - message: 'Successfully added product to the cart' - }) -} -```