1.0.17 • Published 2 years ago

toastify-lib v1.0.17

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Toastify-lib

šŸŽ‰ Toastify-lib allows you to add notifications to your app with ease

Installation

$ npm install --save toastify-lib
$ yarn add toastify-lib

The gist

  import React from 'react';

  import { ToastContainer, toast, IToastConfig } from 'toastify-lib';

  
  const App = () => {
    const createToast = () => {
      toast.addToast({
        position: 'top-right',
        animationType: "fade",
        slideDirection: 'top',
        title: 'Title',
        description: 'Description',
        textColor: '#ffffff',
        toastType: 'info',
        toastDuration: 3000,
        backgroundColor: '#9A40D3',
      } as IToastConfig);
    }

    return (
      <div>
        <button onClick={createToast}>Notify!</button>
        <ToastContainer />
      </div>
    );
  }

If you use TypeScript import IToastConfig

Settings

  • title (title for your notification)
  • description (description for your notification)
  • position ('top-left' | 'top-right' | 'bottom-left' | 'bottom-right')
  • animationType ('fade' | 'slide')
  • slideDirection ('top' | 'left' | 'right' | 'bottom')
  • textColor (color for your notification text)
  • backgroundColor (color for your notification background)
  • toastType ('info' | 'success' | 'warning' | 'error')
  • toastDuration (display duration in ms)
1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago