Skip to content

Commit

Permalink
fix newFeature story
Browse files Browse the repository at this point in the history
  • Loading branch information
heswell committed Oct 29, 2023
1 parent e9092e3 commit a63671c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DataSource, TableSchema } from "packages/vuu-data/src";
import { useViewContext } from "packages/vuu-layout/src";
import { DataSource, TableSchema } from "@finos/vuu-data";
import { useViewContext } from "@finos/vuu-layout";
import { useCallback, useMemo, useState } from "react";
import { NewBasketPanel } from "./new-basket-panel";

Expand Down
21 changes: 5 additions & 16 deletions vuu-ui/showcase/src/examples/Apps/NewTheme.examples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
registerComponent,
useLayoutContextMenuItems,
} from "@finos/vuu-layout";
import { ContextMenuProvider, Dialog } from "@finos/vuu-popups";
import { ContextMenuProvider, Dialog, useDialog } from "@finos/vuu-popups";
import {
FeatureConfig,
FeatureProps,
Expand Down Expand Up @@ -94,12 +94,9 @@ const tableFeatures: FeatureProps<FilterTableFeatureProps>[] = Object.values(
}));

const ShellWithNewTheme = () => {
const {
buildMenuOptions,
dialogContent,
handleCloseDialog,
handleMenuAction,
} = useLayoutContextMenuItems();
const { dialog, setDialogState } = useDialog();
const { buildMenuOptions, handleMenuAction } =
useLayoutContextMenuItems(setDialogState);

return (
<ContextMenuProvider
Expand Down Expand Up @@ -127,15 +124,7 @@ const ShellWithNewTheme = () => {
} as CSSProperties
}
>
<Dialog
isOpen={dialogContent !== undefined}
onClose={handleCloseDialog}
style={{ maxHeight: 500, borderColor: "#6d188b" }}
title={"Save Layout"}
hideCloseButton
>
{dialogContent}
</Dialog>
{dialog}
</Shell>
</ContextMenuProvider>
);
Expand Down

0 comments on commit a63671c

Please sign in to comment.