mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-05-04 21:35:43 -04:00
wrap item with menu item
This commit is contained in:
@@ -45,15 +45,18 @@ export const Item = ({ to, className, icon: Icon, children, ...props }: Dropdown
|
||||
<span className="text-left">{children}</span>
|
||||
</>
|
||||
);
|
||||
|
||||
return to ? (
|
||||
<Link {...props} to={to} className={clsx(itemStyles(props), className)}>
|
||||
{content}
|
||||
</Link>
|
||||
) : (
|
||||
<button {...props} className={clsx(itemStyles(props), className)}>
|
||||
{content}
|
||||
</button>
|
||||
return (
|
||||
<Menu.Item>
|
||||
{to ? (
|
||||
<Link {...props} to={to} className={clsx(itemStyles(props), className)}>
|
||||
{content}
|
||||
</Link>
|
||||
) : (
|
||||
<button {...props} className={clsx(itemStyles(props), className)}>
|
||||
{content}
|
||||
</button>
|
||||
)}
|
||||
</Menu.Item>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user