notifications

Use the notifications service to inform the user about events without blocking his current worfklow. Notifications will only be visible for a short period of time and won&aops;t be persisted.

Showing a notification

To add a notifiction to the stack, use the show function of the notifications service:

<Button
  onClick={
    (): void => notifications.show({
      type: 'success',
      text: 'This is a notification!'
    })
  }
>
  Show Notification
</Button>

Success or error

Use the type option to notify about the user about an error or a success.

<Button
  onClick={
    (): void => notifications.show({
      type: 'success',
      text: 'This is a notification!'
    })
  }
>
  Show Notification
</Button>