@ansible/ansible-ui-framework
Version:
A framework for building applications using PatternFly.
28 lines (27 loc) • 1.08 kB
TypeScript
import { Dispatch, ReactNode, SetStateAction } from 'react';
interface IPageNotifications {
notificationsDrawerOpen: boolean;
setNotificationsDrawerOpen: Dispatch<SetStateAction<boolean>>;
notificationGroups: Record<string, IPageNotificationGroup>;
setNotificationGroups: Dispatch<SetStateAction<Record<string, IPageNotificationGroup>>>;
}
export interface IPageNotificationGroup {
title: string;
notifications: IPageNotification[];
}
export interface IPageNotification {
title: string;
description?: string | undefined;
timestamp?: string;
variant?: 'success' | 'danger' | 'warning' | 'info';
to: string;
}
export declare const PageNotificationsContext: import("react").Context<IPageNotifications>;
export declare function usePageNotifications(): IPageNotifications;
export declare function PageNotificationsProvider(props: {
children: ReactNode;
}): import("react/jsx-runtime").JSX.Element;
export declare function PageNotificationsDrawer(props: {
children: ReactNode;
}): import("react/jsx-runtime").JSX.Element;
export {};