🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

react-notify-library

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-notify-library

``` import { Notifications, addNotification } from 'react-notify-library'; ```

npmnpm
Version
0.0.7
Version published
Weekly downloads
8
-65.22%
Maintainers
1
Weekly downloads
 
Created
Source

React-notify-library

import { Notifications, addNotification } from 'react-notify-library';

Notifications

Container component for notifications, recommended to import in root app component

Props
  • position?: ("top-right" (default) | "top-center" | "top-left" | "bottom-right" | "bottom-center" | "bottom-left")
  • width?: String | Number (value will be in px) (default - 320px)
  • baseSettings?: Object - this property is using to set up base settings for all notifications, object properties must be one of notification params (params example below)
  • typeStyles?: Object - this property is using to rewrite default styles for different notification types, passed object is merging with default type styles, object properties is equal to notification types
TypeStyles
{
    success?: (your styles for success notification),
    warning?: (your styles for warning notificaion),
    ...
}

addNotification

Function for adding notifications, which takes a message and object with params

  • message: string | Function,
Params
  • type?: ("default" (default) | "info" | "success" | "warning" | "error" | "dark"),
  • onClose?: Function,
  • onClick?: Function,
  • autoClose?: Number | Boolean (default - 4000ms),
  • pauseOnHover?: Boolean,
  • transition?: ("fade" | "bounce" | "slide" (default) | Object (object with custom transition, which must be dependent on Transition state from ReactTransitionGroup)),
  • transitionTimeout?: Number (default - 300ms),
  • customCloseIcon?: Function,
  • customStyles?: Object
Custom transition
{
  entering?: (your styles for current transition state);
  entered?: (your styles for current transition state);
  exiting?: (your styles for current transition state);
  exited?: (your styles for current transition state);
  unmounted?: (your styles for current transition state);
}
CustomStyles
{
    root?: (your styles for notification component),
    closeWrapper?: (your styles for close icon wrapper),
    closeIcon?: (your styles for default close icon)
}

Keywords

react

FAQs

Package last updated on 29 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts