You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
585 B
TypeScript
20 lines
585 B
TypeScript
2 years ago
|
import React from 'react';
|
||
|
import type { MessageInstance } from '../message/interface';
|
||
|
import type { NotificationInstance } from '../notification/interface';
|
||
|
import type { ModalStaticFunctions } from '../modal/confirm';
|
||
|
|
||
|
type ModalType = Omit<ModalStaticFunctions, 'warn'>;
|
||
|
export interface useAppProps {
|
||
|
message: MessageInstance;
|
||
|
notification: NotificationInstance;
|
||
|
modal: ModalType;
|
||
|
}
|
||
|
|
||
|
const AppContext = React.createContext<useAppProps>({
|
||
|
message: {} as MessageInstance,
|
||
|
notification: {} as NotificationInstance,
|
||
|
modal: {} as ModalType,
|
||
|
});
|
||
|
|
||
|
export default AppContext;
|