Skip to content

NoticeBubble

NoticeBubbleManager

js
import NoticeBubbleManager from 'intergalactic/notice-bubble';
import NoticeBubbleManager from 'intergalactic/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

NameTypeDescription
add(props: | ) => {uid: string; update: (props: Partial<> | Partial<>) => boolean; remove: () => boolean}Creates and shows a notice.
update(uid: string, props: Partial<> | Partial<>) => booleanUpdates notice by uid.
remove(uid: string) => booleanRemoves notice by uid.

NoticeBubbleContainer

js
import { NoticeBubbleContainer } from 'intergalactic/notice-bubble';
import { NoticeBubbleContainer } from 'intergalactic/notice-bubble';

Container - div in the body via the portal (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

& & {...}
NameTypeDescription
managerManager copy
localestring

Released under the MIT License.

Released under the MIT License.