INotificationsPanelComponentProps
NotificationsPanel component props.
export interface INotificationsPanelComponentProps
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
Loaded notifications, relevant for the currently active view. | |||
The currently active view of the notifications panel. | |||
(view: INotificationsPanelView) => void | The callback to change the active view of the notifications panel. | ||
() => void | The callback to close the notifications panel. | ||
(Optional) The error that occurred while loading notifications. | |||
boolean | Indicates if there is a next page of notifications. | ||
boolean | Indicates if there are unread notifications. | ||
number | The height of the notification item in pixels. | ||
number | Padding of the notification item (from left/right) in pixels. | ||
number | Gap between notification items in pixels. | ||
() => void | The callback to load the next page of notifications. | ||
() => Promise<void> | The callback to mark all notifications as read. | ||
(notificationId: string) => Promise<void> | The callback to mark a notification as read. | ||
number | (Optional) Maximum height of the notifications list in pixels. | ||
ComponentType<INotificationComponentProps> | Custom notification component. | ||
ComponentType<INotificationSkeletonItemComponentProps> | Custom notification skeleton item component. | ||
ComponentType<INotificationsListComponentProps> | Custom notifications list component. | ||
ComponentType<INotificationsListEmptyStateComponentProps> | Custom notifications list empty state component. | ||
ComponentType<INotificationsListErrorStateComponentProps> | Custom notifications list error state component. | ||
ComponentType<INotificationsPanelHeaderComponentProps> | Custom notifications panel header component. | ||
(notification: INotification) => void | (Optional) The callback to handle a notification click. | ||
() => void | The callback to open the notifications panel. | ||
number | Number of skeleton items to render when loading notifications. | ||
The status of the notifications loading. | |||
() => void | The callback to toggle the notifications panel. | ||
number | The number of unread notifications. |
Property details
INotificationsPanelComponentProps.activeNotificationsproperty
Loaded notifications, relevant for the currently active view.
activeNotifications: INotification[];
INotificationsPanelComponentProps.activeViewproperty
The currently active view of the notifications panel.
activeView: INotificationsPanelView;
INotificationsPanelComponentProps.changeActiveViewproperty
The callback to change the active view of the notifications panel.
changeActiveView: (view: INotificationsPanelView) => void;
INotificationsPanelComponentProps.closeNotificationsPanelproperty
The callback to close the notifications panel.
closeNotificationsPanel: () => void;
INotificationsPanelComponentProps.errorproperty
The error that occurred while loading notifications.
error?: GoodDataSdkError;
INotificationsPanelComponentProps.hasNextPageproperty
Indicates if there is a next page of notifications.
hasNextPage: boolean;
INotificationsPanelComponentProps.hasUnreadNotificationsproperty
Indicates if there are unread notifications.
hasUnreadNotifications: boolean;
INotificationsPanelComponentProps.itemHeightproperty
The height of the notification item in pixels.
itemHeight: number;
INotificationsPanelComponentProps.itemPaddingproperty
Padding of the notification item (from left/right) in pixels.
itemPadding: number;
INotificationsPanelComponentProps.itemsGapproperty
Gap between notification items in pixels.
itemsGap: number;
INotificationsPanelComponentProps.loadNextPageproperty
The callback to load the next page of notifications.
loadNextPage: () => void;
INotificationsPanelComponentProps.markAllNotificationsAsReadproperty
The callback to mark all notifications as read.
markAllNotificationsAsRead: () => Promise<void>;
INotificationsPanelComponentProps.markNotificationAsReadproperty
The callback to mark a notification as read.
markNotificationAsRead: (notificationId: string) => Promise<void>;
INotificationsPanelComponentProps.maxListHeightproperty
Maximum height of the notifications list in pixels.
maxListHeight?: number;
INotificationsPanelComponentProps.Notificationproperty
Custom notification component.
Notification: ComponentType<INotificationComponentProps>;
INotificationsPanelComponentProps.NotificationSkeletonItemproperty
Custom notification skeleton item component.
NotificationSkeletonItem: ComponentType<INotificationSkeletonItemComponentProps>;
INotificationsPanelComponentProps.NotificationsListproperty
Custom notifications list component.
NotificationsList: ComponentType<INotificationsListComponentProps>;
INotificationsPanelComponentProps.NotificationsListEmptyStateproperty
Custom notifications list empty state component.
NotificationsListEmptyState: ComponentType<INotificationsListEmptyStateComponentProps>;
INotificationsPanelComponentProps.NotificationsListErrorStateproperty
Custom notifications list error state component.
NotificationsListErrorState: ComponentType<INotificationsListErrorStateComponentProps>;
INotificationsPanelComponentProps.NotificationsPanelHeaderproperty
Custom notifications panel header component.
NotificationsPanelHeader: ComponentType<INotificationsPanelHeaderComponentProps>;
INotificationsPanelComponentProps.onNotificationClickproperty
The callback to handle a notification click.
onNotificationClick?: (notification: INotification) => void;
INotificationsPanelComponentProps.openNotificationsPanelproperty
The callback to open the notifications panel.
openNotificationsPanel: () => void;
INotificationsPanelComponentProps.skeletonItemsCountproperty
Number of skeleton items to render when loading notifications.
skeletonItemsCount: number;
INotificationsPanelComponentProps.statusproperty
The status of the notifications loading.
status: UseCancelablePromiseStatus;
INotificationsPanelComponentProps.toggleNotificationsPanelproperty
The callback to toggle the notifications panel.
toggleNotificationsPanel: () => void;
INotificationsPanelComponentProps.unreadNotificationsCountproperty
The number of unread notifications.
unreadNotificationsCount: number;