UNPKG

@cd-pkg/core-ui-sass

Version:
35 lines (30 loc) 733 B
import {createContext} from "react" import {INotifyPopup, IPageLoaderProps, PopupProps, DialogProps} from "../props" export const PopupContext = createContext<PopupProps>({ popup: { children: null, message: "", title: "", heading: "", }, togglePopup: () => {}, closable: true, }) export const DialogContext = createContext<DialogProps>({ dialog: {}, toggleDialog: () => {}, }) export const NotifyContext = createContext<INotifyPopup>({ notify: { type: "information", title: "", ctaText: "", description: "", onClickCta: () => {}, }, toggleNotify: () => {}, }) export const PageLoaderContext = createContext<IPageLoaderProps>({ toggleLoading: () => {}, loading: false, })