From 9630a14707492bf70d24cee9a1d2ffe81ff71ff2 Mon Sep 17 00:00:00 2001 From: Erika <3019731+Princesseuh@users.noreply.github.com> Date: Fri, 8 Mar 2024 22:16:39 +0100 Subject: [PATCH] feat(dev-toolbar-reference): Add level property to notifications (#7200) Co-authored-by: Sarah Rainsberger --- .../en/reference/dev-toolbar-app-reference.mdx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/content/docs/en/reference/dev-toolbar-app-reference.mdx b/src/content/docs/en/reference/dev-toolbar-app-reference.mdx index 41302965423bf..f769cb1135cf5 100644 --- a/src/content/docs/en/reference/dev-toolbar-app-reference.mdx +++ b/src/content/docs/en/reference/dev-toolbar-app-reference.mdx @@ -171,6 +171,20 @@ This event can be sent to inform the user that the app requires attention. Indicates whether or not the app has a notification for the user. When `true`, the app icon will be highlighted using a red dot. Conversely, when `false`, the highlight will be removed. If this property is not specified, `true` will be assumed. +#### `level: 'error' | 'warning' | 'info'` + +Indicates the level of the notification. This will be used to determine the color and shape (dark pink circle, gold triangle, or blue square) of the highlight on the app icon. If this property is not specified, `'error'` will be assumed. + +```ts +eventTarget.dispatchEvent( + new CustomEvent("toggle-notification", { + detail: { + level: "warning", + }, + }) +); +``` + ### `toggle-app` This event can be sent from your app to change the state of your app. This can be useful, for instance, to implement a "Close" button in your app's UI.