dyzz-toaster
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

simple react toaster component for show notifications

how to use:

import {IToasterTypes, NotificationToast, ToastEvent, toastEventManager} from 'dyzz-toaster';


export const Button = () =>
    <button onClick={() => {
        toastEventManager.emit(ToastEvent.CREATE,
        {timeOutDelay: 9000, indicateLine: true, text: 'it is error toaster', type: IToasterTypes.ERROR})

        toastEventManager.emit(ToastEvent.CREATE,
            {timeOutDelay: 7000, indicateLine: true, text: 'it is notification toaster', type: IToasterTypes.NOTIFICATION})
    }}>show toast</button>

export function App() {
    return (
        <>
            <NotificationToast/>
            <Button/>
        </>
    )
}

Package Sidebar

Install

npm i dyzz-toaster

Weekly Downloads

1

Version

1.2.0

License

none

Unpacked Size

31.2 kB

Total Files

10

Last publish

Collaborators

  • dyzz24