Notification

Notifications provide important information inline with the content body within a view. These notifications do not self-dismiss and have the option to include a close “X”.

When to use

  • When another user of the app direct messages the current user.
  • When the app requires immediate action by the current user.
  • When the app must communicate actionable information from outside the current context.

Notification Basic Usage

Notification with all Available Kinds

Notification Closeable example

Notification in Full width

Notification with Overrides

Notification with Custom Dismiss

Overrides

Additionally, you can fully customize any part of the Notification through the overrides prop. The Notification consists of multiple subcomponents that are listed bellow and you can override each one of them. To help you identify the names of these subcomponents, you can highlight them through this selector:

Note: You should always use longhand CSS properties. Mixing shorthands and longhands will lead into strange behaviors!

Notification API

Warning any = "Prop types are not shown in dev mode"

extract-react-types is not being run in dev mode for speed reasons. If you need to see prop types add the environment variable FORCE_EXTRACT_REACT_TYPES eg:

  • FORCE_EXTRACT_REACT_TYPES=true yarn start <packageName>
  • FORCE_EXTRACT_REACT_TYPES=true yarn start:<team>