Refactor draggable list (#1874)

This commit is contained in:
Charles Bochet
2023-10-04 17:29:18 +02:00
committed by GitHub
parent f59dc75627
commit 13c8ee29f7
7 changed files with 78 additions and 40 deletions

View File

@ -8,7 +8,6 @@ import { MenuItemAccent } from '../types/MenuItemAccent';
import { MenuItemIconButton } from './MenuItem';
export type MenuItemDraggableProps = {
key: string;
LeftIcon: IconComponent | undefined;
accent?: MenuItemAccent;
iconButtons?: MenuItemIconButton[];
@ -18,7 +17,6 @@ export type MenuItemDraggableProps = {
className?: string;
};
export const MenuItemDraggable = ({
key,
LeftIcon,
accent = 'default',
iconButtons,
@ -31,7 +29,6 @@ export const MenuItemDraggable = ({
return (
<StyledHoverableMenuItemBase
data-testid={key ?? undefined}
onClick={onClick}
accent={accent}
className={className}
@ -39,7 +36,6 @@ export const MenuItemDraggable = ({
<MenuItemLeftContent
LeftIcon={LeftIcon}
text={text}
key={key}
showGrip={!isDragDisabled}
/>
<div className="hoverable-buttons">