MessageBar
3p-core / MessageBar
Variable: MessageBar
const
MessageBar:React.FC
<MessageBarProps
>
Renders a contextual message bar with an optional action button.
Remarks
The bar is left-border-accented and adapts its icon and color theme according to the
supplied `type` value.
An ActionButton can be shown on the right for quick user interaction
(e.g. “Undo”, “Retry”, “Learn more”…).
Param
Returns
React element representing the message bar.
Examples
Basic usage
<MessageBar type="success">
Your profile has been saved.
</MessageBar>
With action button
<MessageBar
type="warning"
buttonProps={{
label: 'Undo',
icon: 'Undo',
onClick: () => console.log('Undo clicked'),
}}
>
File deleted.
</MessageBar>