-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
import {createContext} from "react" | ||
import type {PanelMode} from "@/types" | ||
|
||
/* | ||
`@/component/DualPanel` component features two panels. One of the panels | ||
is called "main" and another one "secondary". Both panels | ||
are rendered using same `@/components/SinglePanel` component. In | ||
order to distinguish between the two - panel mode is passed as via | ||
react context. | ||
Panel with mode "main" (i.e. main panel) is always present. | ||
Panel with mode "secondary" - may or may not be present; in other | ||
words, "secondary" panel may be closed, while "main" panel | ||
cannot be closed. | ||
*/ | ||
const PanelContext = createContext<PanelMode>("main") | ||
|
||
export default PanelContext |