Fix for extra divider in the context menu (#222)

* Fix for extra divider in the context menu

* Moves divider to above group section, if present

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
This commit is contained in:
Proful Sadangi 2021-11-06 19:04:44 +11:00 committed by GitHub
parent 0508857535
commit bbb2bfbeb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -133,18 +133,18 @@ export const ContextMenu = ({ children }: ContextMenuProps): JSX.Element => {
<CMRowButton onSelect={handleDuplicate} kbd="#D">
Duplicate
</CMRowButton>
<Divider />
{(hasTwoOrMore || hasGroupSelected) && <Divider />}
{hasTwoOrMore && (
<CMRowButton onSelect={handleGroup} kbd="#G">
Group
</CMRowButton>
)}
<Divider />
{hasGroupSelected && (
<CMRowButton onSelect={handleGroup} kbd="#⇧G">
Ungroup
</CMRowButton>
)}
<Divider />
<ContextMenuSubMenu label="Move">
<CMRowButton onSelect={handleMoveToFront} kbd="⇧]">
To Front