UNPKG

ar-design

Version:

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

25 lines (24 loc) 1.05 kB
import React, { ReactNode } from "react"; 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 PopupButtonProps = { okay?: { text?: string; onClick?: () => void; }; }; type NotificationContextProps = { setTitle: React.Dispatch<React.SetStateAction<string>>; setMessage: React.Dispatch<React.SetStateAction<string>>; setStatus: React.Dispatch<React.SetStateAction<Status | number>>; setTrigger: React.Dispatch<React.SetStateAction<boolean>>; setIsPopupOpen: React.Dispatch<React.SetStateAction<boolean>>; setPopupButtons: React.Dispatch<React.SetStateAction<PopupButtonProps | null>>; }; declare const NotificationContext: React.Context<Partial<NotificationContextProps>>; declare const NotificationProvider: ({ children, direction }: Props) => React.JSX.Element; export { NotificationContext, NotificationProvider };