Fix sidebar request focus

This commit is contained in:
Gregory Schier
2023-04-09 22:03:41 -07:00
parent a8d73f74f4
commit 768a13ff4d
2 changed files with 10 additions and 2 deletions

View File

@@ -359,7 +359,14 @@ function MenuItem({ className, focused, onFocus, item, onSelect, ...props }: Men
{...props}
>
{item.leftSlot && <div className="pr-2 flex justify-start">{item.leftSlot}</div>}
<div>{item.label}</div>
<div
className={classnames(
// Add padding on right when no right slot, for some visual balance
!item.rightSlot && 'pr-4',
)}
>
{item.label}
</div>
{item.rightSlot && <div className="ml-auto pl-3">{item.rightSlot}</div>}
</button>
);