NoticeBubble
NoticeBubbleManager
js
import NoticeBubbleManager from '@semcore/ui/notice-bubble';
Manager is a storage of all notice instances, it is able to add, delete and update notices by calling the appropriate methods.
NoticeBubbleManagerClass
Name | Type | Description |
---|---|---|
add | (props: | ) => {uid: string; update: (props: Partial<> | Partial<>) => boolean; remove: () => boolean; ref: React.RefObject<>; focus: () => void } | Creates and shows a notice. |
update | (uid: string, props: Partial<> | Partial<>) => boolean | Updates notice by uid. |
remove | (uid: string) => boolean | Removes notice by uid. |
replaceLast | (props: | ) => void | Replace last notice (if it is existing) |
NoticeBubbleContainer
js
import { NoticeBubbleContainer } from '@semcore/ui/notice-bubble';
Container is a div
created in the body
using React.Portal
. It is inserted once in any part of the application and subscribes to Manager updates (NoticeBubbleManager
). Later, notices will be rendered to it.
NoticeBubbleContainerProps
& & {...}Name | Type | Description |
---|---|---|
manager | Manager copy | |
locale | string |