ant-design/components/app/context.ts
黑雨 01ae089b70
doc: Update app (#39572)
* feat: update doc

* Update basic.md

Co-authored-by: lijianan <574980606@qq.com>
2022-12-15 11:40:25 +08:00

20 lines
544 B
TypeScript

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: {},
notification: {},
modal: {},
} as useAppProps);
export default AppContext;