import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks';
import { ToastCentre } from './toast-centre.component';

<Meta title="Components/Overlays/ToastCentre" component={ToastCentre} />

# ToastCentre

The `<ToastCentre />` takes a list of `messages` with the following shape:

- `text` (required): text to be displayed
- `onClose` callback: will be fired after the toast is closed
- `id`: the argument passed when calling the `onClose` callback
- `timerDelay` (default: 5000): custom time in milliseconds to dismiss the toast
- `level`: one of info, success, or error

## Default

<Canvas>
  <Story id="components-overlays-toastcentre--default" />
</Canvas>

## Custom Delay

<Canvas>
  <Story id="components-overlays-toastcentre--toast-centre-with-custom-delay" />
</Canvas>
