rc-notification

  • Version 5.6.0
  • Published
  • 88.3 kB
  • 4 dependencies
  • MIT license

Install

npm i rc-notification
yarn add rc-notification
pnpm add rc-notification

Overview

notification ui component for react

Index

Variables

variable Notice

const Notice: React.ForwardRefExoticComponent<any>;

    variable NotificationProvider

    const NotificationProvider: FC<NotificationProviderProps>;

      Functions

      function useNotification

      useNotification: (
      rootConfig?: NotificationConfig
      ) => [NotificationAPI, React.ReactElement];

        Interfaces

        interface NotificationAPI

        interface NotificationAPI {}

          property close

          close: (key: React.Key) => void;

            property destroy

            destroy: () => void;

              property open

              open: (config: OptionalConfig) => void;

                interface NotificationConfig

                interface NotificationConfig {}

                  property className

                  className?: (placement: Placement) => string;
                  • @private. Config for notification holder style. Safe to remove if refactor

                  property closable

                  closable?:
                  | boolean
                  | ({
                  closeIcon?: React.ReactNode;
                  } & React.AriaAttributes);

                    property closeIcon

                    closeIcon?: React.ReactNode;

                      property duration

                      duration?: number;

                        property getContainer

                        getContainer?: () => HTMLElement | ShadowRoot;
                        • Customize container. It will repeat call which means you should return same container element.

                        property maxCount

                        maxCount?: number;

                          property motion

                          motion?: CSSMotionProps | ((placement: Placement) => CSSMotionProps);

                            property onAllRemoved

                            onAllRemoved?: VoidFunction;
                            • Trigger when all the notification closed.

                            property pauseOnHover

                            pauseOnHover?: boolean;

                              property prefixCls

                              prefixCls?: string;

                                property renderNotifications

                                renderNotifications?: NotificationsProps['renderNotifications'];
                                • Slot for style in Notifications

                                property showProgress

                                showProgress?: boolean;

                                  property stack

                                  stack?: StackConfig;

                                    property style

                                    style?: (placement: Placement) => React.CSSProperties;
                                    • @private. Config for notification holder style. Safe to remove if refactor

                                    Package Files (4)

                                    Dependencies (4)

                                    Dev Dependencies (24)

                                    Peer Dependencies (2)

                                    Badge

                                    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/rc-notification.

                                    • Markdown
                                      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/rc-notification)
                                    • HTML
                                      <a href="https://www.jsdocs.io/package/rc-notification"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>