@brighthr/component-toast
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

ComponentName

Installation

To install, type the following into the command line at the root of your project:

npm i @brighthr/component-toast

placeholder for where toasts will appear

Where you add the Toaster component to the app will be the container that the toast messages will appear in. Recommended that this should be at the root of your app so they appear in the bottom left corner.

import { Toaster } from '@brighthr/component-toast';

<div>
	<Toaster />
</div>;

create a new toast

Import into your file:

import { useToast } from '@brighthr/component-toast';

const { createToast } = useToast();

<Button onClick={() => createToast({
    text: 'message for toast',
    type: 'information'
})}>

/@brighthr/component-toast/

    Package Sidebar

    Install

    npm i @brighthr/component-toast

    Weekly Downloads

    477

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    22.1 kB

    Total Files

    8

    Last publish

    Collaborators

    • bright.hr