diff --git a/.changeset/silver-dingos-travel.md b/.changeset/silver-dingos-travel.md new file mode 100644 index 000000000..a9975af2f --- /dev/null +++ b/.changeset/silver-dingos-travel.md @@ -0,0 +1,5 @@ +--- +'@spotlightjs/astro': patch +--- + +feat(astro): Toggle notification dot when receving a severe event diff --git a/packages/astro/src/overlay/index.ts b/packages/astro/src/overlay/index.ts index c3a259d55..67c84c73a 100644 --- a/packages/astro/src/overlay/index.ts +++ b/packages/astro/src/overlay/index.ts @@ -37,5 +37,27 @@ export default { }), ); }); + + Spotlight.onOpen(() => { + setTimeout(() => { + eventTarget.dispatchEvent( + new CustomEvent('toggle-notification', { + detail: { + state: false, + }, + }), + ); + }, 500); + }); + + Spotlight.onSevereEvent(() => { + eventTarget.dispatchEvent( + new CustomEvent('toggle-notification', { + detail: { + state: true, + }, + }), + ); + }); }, } satisfies DevOverlayPlugin;