mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 20:38:52 +00:00
close AF-1663, AF-1756 - new global `ModalConfigContext` - new logic to judge whether inside modal - render `✕` for PageHeader back if inside modal - only enable `NavigationGesture` when there is `<` in PageHeader
12 lines
300 B
TypeScript
12 lines
300 B
TypeScript
import { createContext } from 'react';
|
|
|
|
export interface ModalConfig {
|
|
/**
|
|
* add global callback for modal open/close
|
|
*/
|
|
onOpenChange?: (open: boolean) => void;
|
|
}
|
|
export const ModalConfigContext = createContext<ModalConfig>({});
|
|
|
|
export const InsideModalContext = createContext<number>(0);
|