2020-08-18 04:35:11 +00:00
|
|
|
import React from 'react';
|
2021-05-16 19:35:49 +00:00
|
|
|
import { SettableModalProps } from '@/hoc/asModal';
|
2020-08-18 04:35:11 +00:00
|
|
|
|
|
|
|
export interface ModalContextValues {
|
|
|
|
dismiss: () => void;
|
2021-05-16 19:35:49 +00:00
|
|
|
setPropOverrides: (value: ((current: Readonly<Partial<SettableModalProps>>) => Partial<SettableModalProps>) | Partial<SettableModalProps> | null) => void;
|
2020-08-18 04:35:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const ModalContext = React.createContext<ModalContextValues>({
|
|
|
|
dismiss: () => null,
|
2021-05-16 19:35:49 +00:00
|
|
|
setPropOverrides: () => null,
|
2020-08-18 04:35:11 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
ModalContext.displayName = 'ModalContext';
|
|
|
|
|
|
|
|
export default ModalContext;
|