@splunk/react-toast-notifications

0.11.3 • Public • Published

@splunk/react-toast-notifications

A package for creating toast notifications in a React application.

Install

Install the package and its dependencies.

  1. Install the peer dependencies:
    npm install react@^16 styled-components@^5
    
  2. Install the package:
    npm install @splunk/react-toast-notifications
    

Usage

Only import these once. See Usage for details.

import ToastMessages from '@splunk/react-toast-notifications/ToastMessages';
import Toaster, { makeCreateToast } from '@splunk/react-toast-notifications/Toaster';
import { TOAST_TYPES } from '@splunk/react-toast-notifications/ToastConstants';

Production builds

Both @splunk/react-toast-notifications and React support production and development builds. The production build removes warnings and guidance from the output. To create a production build, set the environment variable NODE_ENV to "production" and use the webpack DefinePlugin to inject the variable into the code.

/@splunk/react-toast-notifications/

    Package Sidebar

    Install

    npm i @splunk/react-toast-notifications

    Weekly Downloads

    319

    Version

    0.11.3

    License

    Apache-2.0

    Unpacked Size

    126 kB

    Total Files

    13

    Last publish

    Collaborators

    • splunker
    • splunk_sui_publish