UNPKG

ar-design

Version:

AR Design is a (react | nextjs) ui library.

26 lines (25 loc) 1.29 kB
import React, { ReactNode } from "react"; import IButtonProps from "../../../../components/form/button/IProps"; export type Status = "success" | "warning" | "information" | "error"; export type Direction = "top-left" | "top-right" | "bottom-left" | "bottom-right"; type Props = { children: ReactNode; direction: Direction; }; export type PopupButtonConfig = { okay?: IButtonProps; cancel?: IButtonProps; }; type NotificationContextProps = { setTitle: React.Dispatch<React.SetStateAction<string>>; setMessage: React.Dispatch<React.SetStateAction<string>>; setStatus: React.Dispatch<React.SetStateAction<Status | number>>; setPopupStatus: React.Dispatch<React.SetStateAction<(Status | "save" | "delete") | number>>; setTrigger: React.Dispatch<React.SetStateAction<boolean>>; setIsPopupOpen: React.Dispatch<React.SetStateAction<boolean>>; setPopupButtons: React.Dispatch<React.SetStateAction<PopupButtonConfig | null>>; setOnConfirm: React.Dispatch<React.SetStateAction<((confirm: boolean) => void) | null>>; }; declare const NotificationContext: React.Context<Partial<NotificationContextProps>>; declare const NotificationProvider: ({ children, direction }: Props) => React.JSX.Element; export { NotificationContext, NotificationProvider };