2.3.0 • Published 5 months ago

@igloo-ui/toaster v2.3.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
5 months ago

Toaster

The Toaster component is a non-disruptive message that appears at the top of the viewport to provide quick, at-a-glance feedback on the outcome of an action.

Installation

To install @igloo-ui/toaster in your project, you will need to run the following command using npm:

npm install @igloo-ui/toaster

If you prefer Yarn, use the following command instead:

yarn add @igloo-ui/toaster

Usage

Displaying a toast

Then to use the component in your code just import it!

import Toaster, { toast } from '@igloo-ui/toaster';
import Button from '@igloo-ui/button';

const App = () => {
  return (
    <div>
      <Button onClick={() => toast.success('Successfully toasted!')}>
        Success
      </Button>

      <Toaster />
    </div>
  );
};

Displaying multiple toasts with custom duration

Then to use the component in your code just import it!

import Toaster, { toast } from '@igloo-ui/toaster';
import Button from '@igloo-ui/button';

const App = () => {
  return (
    <div>
      <Button onClick={() => toast.success('Successfully toasted!', {duration: 6000})}>
        Success
      </Button>
      <Button
        appearance="secondary"
        onClick={() => toast.error("This didn't work!", {duration: 3000}))}
      >
        Error
      </Button>

      <Toaster />
    </div>
  );
};
2.3.0

5 months ago

2.2.2

5 months ago

2.2.1

7 months ago

2.2.0

9 months ago

2.1.9

9 months ago

2.1.8

10 months ago

2.1.7

10 months ago

2.1.6

11 months ago

2.1.5

12 months ago

2.1.4

12 months ago

2.1.3

12 months ago

2.1.2

1 year ago

2.1.1

1 year ago

2.1.0

1 year ago

2.0.6

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.3

1 year ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.5

2 years ago

1.0.4

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

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.1

3 years ago