mirror of
https://github.com/muerwre/markdown-home-tab.git
synced 2025-04-25 00:46:41 +07:00
added simple modal dialog
This commit is contained in:
parent
2d11fef559
commit
3f81f6d3b3
12 changed files with 157 additions and 7 deletions
|
@ -6,6 +6,7 @@ import { GridLayoutItemWrapper } from "../GridLayoutItemWrapper";
|
|||
import { splitLayoutVertical } from "./utils/splitLayoutVertical";
|
||||
import { splitLayoutHorizontal } from "./utils/splitLayoutHorizontal";
|
||||
import styles from "./styles.module.scss";
|
||||
import { useSettings } from "~/modules/settings/context/SettingsContext";
|
||||
|
||||
export interface GridLayoutProps {
|
||||
component: FC<GridLayoutComponentProps>;
|
||||
|
@ -22,6 +23,8 @@ const DefaultLayout = ({
|
|||
panelProps,
|
||||
persistLayout,
|
||||
}: DefaultLayoutProps) => {
|
||||
const { show: showSettings } = useSettings();
|
||||
|
||||
const splitVertical = useCallback(() => {
|
||||
splitLayoutVertical(panelProps.api.id, panelProps.containerApi);
|
||||
}, [panelProps.api.id, panelProps.containerApi]);
|
||||
|
@ -54,6 +57,7 @@ const DefaultLayout = ({
|
|||
remove={remove}
|
||||
locked={locked}
|
||||
lock={lock}
|
||||
showSettings={showSettings}
|
||||
>
|
||||
{createElement(component, {
|
||||
id: panelProps.api.id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue