Skip to content

Commit

Permalink
fix: fix context menu error on macOS (#170)
Browse files Browse the repository at this point in the history
* fix: fix context menu error on macOS

* fix: adjust context menu icon style
  • Loading branch information
ccloli authored Jun 3, 2024
1 parent 00bf52a commit ca740c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion packages/designer/src/components/context-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ const contextMenuStyle = css`
}
.ant-dropdown-menu-title-content {
padding-left: 20px;
padding-left: 22px;
}
.ant-dropdown-menu-item-icon {
font-size: 14px;
width: 14px;
}
.ant-dropdown-menu-item-icon + .ant-dropdown-menu-title-content {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/context-action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function ContextAction({
option: 'Alt',
shift: 'Shift',
};
const regexp = new RegExp(Object.keys(keyMap).join('|').replace(/\\+/, '\\+'), 'ig');
const regexp = new RegExp(Object.keys(keyMap).join('|').replace(/\+/, '\\+'), 'ig');
return hotkey.replace(regexp, (match) => keyMap[match.toLowerCase()]);
}, [hotkey]);

Expand Down

0 comments on commit ca740c8

Please sign in to comment.