Skip to content

Commit

Permalink
fix: contextmenu
Browse files Browse the repository at this point in the history
  • Loading branch information
dineug committed Oct 26, 2023
1 parent ed3da5c commit d9e8bd3
Show file tree
Hide file tree
Showing 15 changed files with 390 additions and 537 deletions.
5 changes: 2 additions & 3 deletions packages/erd-editor/.storybook/ThemeProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ type ThemeProviderProps = {
story: any;
};

const ThemeProvider: FC<ThemeProviderProps> = props => {
return () => html`
const ThemeProvider: FC<ThemeProviderProps> = props => () =>
html`
<${GlobalStyles} />
<${Theme}
.theme=${createTheme({
Expand All @@ -27,6 +27,5 @@ const ThemeProvider: FC<ThemeProviderProps> = props => {
/>
${props.story}
`;
};

export default ThemeProvider;
14 changes: 5 additions & 9 deletions packages/erd-editor/src/components/erd/Erd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,11 @@ const Erd: FC<ErdProps> = (props, ctx) => {
@wheel=${handleWheel}
>
<${Canvas} />
${contextMenu.state.show
? html`
<${ErdContextMenu}
type=${ErdContextMenuType.ERD}
root=${root}
.onClose=${handleContextmenuClose}
/>
`
: null}
<${ErdContextMenu}
type=${ErdContextMenuType.ERD}
root=${root}
.onClose=${handleContextmenuClose}
/>
</div>
`;
};
Expand Down
Loading

0 comments on commit d9e8bd3

Please sign in to comment.