Improve this doc View source

pfNotificationDrawer
directive in module patternfly.notification

Description

Directive for rendering a notification drawer. This provides a common mechanism to handle how the notification drawer should look and behave without mandating the look of the notification group heading or notification body.

An array of notification groups must be passed to create each group in the drawer. Each notification group must include an array of notifications to be shown for that group, the array MUST be called 'notifications'. You must provide the source for the heading, sub-heading, and notification body to show the content you desire for each. Pass a customScope object containing any scope variables/functions you need to access from the included source, access these via hanlders. in your included source.

Usage

as attribute
<ANY pf-notification-drawer
     drawer-hidden="{boolean}"
     allow-expand="{boolean}"
     draw-expanded="{boolean}"
     drawer-title="{string}"
     notification-groups="{object}"
     action-button-title="{string}"
     action-button-callback="{function}"
     title-include="{string}"
     heading-include="{string}"
     subheading-include="{string}"
     notification-body-include="{string}"
     notification-footer-include="{string}"
     custom-scope="{object}">
   ...
</ANY>

Parameters

ParamTypeDetails
drawerHiddenboolean

Flag if the drawer is currently hidden

allowExpandboolean

Flag if the drawer can be expanded. Optional, default: false

drawExpandedboolean

Flag if the drawer is expanded (only valid if allowExpand is true). Optional, default: false

drawerTitlestring

Title to display for the drawer (leaving this blank will remove the provided expand capability)

notificationGroupsobject

Array of notification groups to add to the drawer

actionButtonTitlestring

Text for the lower action button of the drawer (optional, if not specified there will be no action button)

actionButtonCallbackfunction

function(notificationGroup) Callback method for action button for each group, the notificationGroup is passed (Optional)

titleIncludestring

Include src for the title area for the notification drawer, use this to customize the drawer title area

headingIncludestring

Include src for the heading area for each notification group, access the group via notificationGroup

subheadingIncludestring

Include src for the sub-heading area for each notification group, access the group via notificationGroup

notificationBodyIncludestring

Include src for the notification body for each notification, access the notification via notification

notificationFooterIncludestring

Include src for the notification footer for each notification, access the notification via notification

customScopeobject

Object containing any variables/functions used by the included src, access via customScope.

Example

Source













Demo