The MessagePopover
component is a specialized version of a popover used for conveying state-based information (e.g. success, info, warning or error). Unlike MessageBox
, this component is not intended to prevent the user’s interaction with the application.
There are four supported types (states) of popovers: 'success'
, 'info'
(default), 'warning'
and 'error'
. Use the type
property to set the type.
Property | Type | Default | Description |
---|---|---|---|
children | Node | Required | React component to which the popover will be attached. |
message | Node | Required | Collection of React components to be placed in popover’s content area. |
textClose | String | Required | Localized assistive text for the close button. |
title | String | Required | Popover heading text. |
type | String | Required | Popover type. Options are 'success' , 'info' , 'warning' , 'error' . |
className | String | Custom classes for the popover wrapper. | |
id | String | Random value | Used to build id attributes for accessibility reasons. |
placement | String or String[] | ['right', 'left', 'top', 'bottom'] | Placement of the popover relative to the target element. Options are 'auto' , 'auto-start' , 'auto-end' , 'top' , 'top-start' , 'top-end' , 'bottom' , 'bottom-start' , 'bottom-end' , 'left' , 'left-start' , 'left-end' , 'right' , 'right-start' , 'right-end' . If you use an array of strings, the first item in the array is the default placement and the following ones are chosen in order as fallback placements if the preceding ones don’t work. |
show | Boolean | false | Controls whether the popover is visible. |
Property | Parameters | Description |
---|---|---|
onCloseClicked | event | Callback function fired when the close button is clicked. If this is not passed, an attempt will be made to fire the onHide function instead. |
onHide | Callback function fired when the popover is hidden (typically with a click outside of the popover). |