slots
Home > @gooddata/sdk-ui-dashboard > IDefaultAlertingDialogProps > slots
IDefaultAlertingDialogProps.slots property
This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Section-level overrides. Each slot receives { Default, defaultProps } and may render its own content (replace) or <Default {...defaultProps} /> inside its own markup (wrap).
Signature:
slots?: IAlertingDialogSlots;
Example
The dialog is reached through the Dashboard component override; define slot components at module scope (see ):
function HeaderWithBanner({ Default, defaultProps }: ISlotProps<AlertingDialogHeaderDefaultProps>) {
return (
<>
<WarningBanner>Alerts may take up to 5 minutes.</WarningBanner>
<Default {...defaultProps} />
</>
);
}
<Dashboard
AlertingDialogComponent={(props) => (
<DefaultAlertingDialog {...props} slots={{ Header: HeaderWithBanner }} />
)}
/>;