pulse-dashboard
Version:
A Next.js Dashboard application for real-time monitoring and historical analysis of Playwright test executions, based on playwright-pulse-report. This component provides the UI for visualizing Playwright test results and can be run as a standalone CLI too
47 lines • 1.42 kB
TypeScript
import * as React from "react";
import type { ToastActionElement as UIToastActionElement, // Renamed to avoid conflict
ToastProps } from "@/components/ui/toast";
export type ToastActionElement = UIToastActionElement;
export type ToasterToast = ToastProps & {
id: string;
title?: React.ReactNode;
description?: React.ReactNode;
action?: UIToastActionElement;
};
declare const actionTypes: {
readonly ADD_TOAST: "ADD_TOAST";
readonly UPDATE_TOAST: "UPDATE_TOAST";
readonly DISMISS_TOAST: "DISMISS_TOAST";
readonly REMOVE_TOAST: "REMOVE_TOAST";
};
type ActionType = typeof actionTypes;
type Action = {
type: ActionType["ADD_TOAST"];
toast: ToasterToast;
} | {
type: ActionType["UPDATE_TOAST"];
toast: Partial<ToasterToast>;
} | {
type: ActionType["DISMISS_TOAST"];
toastId?: ToasterToast["id"];
} | {
type: ActionType["REMOVE_TOAST"];
toastId?: ToasterToast["id"];
};
interface State {
toasts: ToasterToast[];
}
export declare const reducer: (state: State, action: Action) => State;
type Toast = Omit<ToasterToast, "id">;
declare function toast({ ...props }: Toast): {
id: string;
dismiss: () => void;
update: (props: ToasterToast) => void;
};
declare function useToast(): {
toast: typeof toast;
dismiss: (toastId?: string) => void;
toasts: ToasterToast[];
};
export { useToast, toast };
//# sourceMappingURL=use-toast.d.ts.map