ant-design/components/modal/context.ts

16 lines
595 B
TypeScript
Raw Normal View History

import React from 'react';
import type { ConfirmCancelBtnProps } from './components/ConfirmCancelBtn';
import type { ConfirmOkBtnProps } from './components/ConfirmOkBtn';
import type { NormalCancelBtnProps } from './components/NormalCancelBtn';
import type { NormalOkBtnProps } from './components/NormalOkBtn';
export type ModalContextProps = NormalCancelBtnProps &
NormalOkBtnProps &
ConfirmOkBtnProps &
ConfirmCancelBtnProps;
export const ModalContext = React.createContext<ModalContextProps>({} as ModalContextProps);
export const { Provider: ModalContextProvider } = ModalContext;