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.
npm install @igloo-ui/toasterThe 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.
To install @igloo-ui/toaster in your project, you will need to run the following command using npm:
``bash`
npm install @igloo-ui/toaster
If you prefer Yarn, use the following command instead:
`bash`
yarn add @igloo-ui/toaster
Then to use the component in your code just import it!
`jsx
import Toaster, { toast } from '@igloo-ui/toaster';
import Button from '@igloo-ui/button';
const App = () => {
return (
$3
Then to use the component in your code just import it!
`jsx
import Toaster, { toast } from '@igloo-ui/toaster';
import Button from '@igloo-ui/button';const App = () => {
return (
appearance="secondary"
onClick={() => toast.error("This didn't work!", {duration: 3000}))}
>
Error
);
};
``