@ansible/ansible-ui-framework
Version:
A framework for building applications using PatternFly.
15 lines (14 loc) • 710 B
TypeScript
import { AlertProps } from '@patternfly/react-core';
import { ReactNode } from 'react';
export interface IPageAlertToaster {
addAlert: (alert: AlertProps) => void;
removeAlert: (alert: AlertProps) => void;
replaceAlert: (oldAlert: AlertProps, newAlert: AlertProps) => void;
removeAlerts: (filter?: (alert: AlertProps) => boolean) => void;
}
export declare const PageAlertToasterContext: import("react").Context<IPageAlertToaster>;
export declare function usePageAlertToaster(): IPageAlertToaster;
export declare function PageAlertToasterProvider(props: {
children: ReactNode;
}): import("react/jsx-runtime").JSX.Element;
export declare function errorToAlertProps(err: unknown): AlertProps;