feat: reorder columns from table options (#1636)
* draggable prop addition * draggable component addition * state modification * drag select state addition * changed state name * main merged * lint fix --------- Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import { useTheme } from '@emotion/react';
|
||||
|
||||
import { IconGripVertical } from '@/ui/icon';
|
||||
import { IconComponent } from '@/ui/icon/types/IconComponent';
|
||||
import { OverflowingTextWithTooltip } from '@/ui/tooltip/OverflowingTextWithTooltip';
|
||||
|
||||
@ -9,15 +10,26 @@ import {
|
||||
} from './StyledMenuItemBase';
|
||||
|
||||
type OwnProps = {
|
||||
isDraggable?: boolean;
|
||||
LeftIcon: IconComponent | null | undefined;
|
||||
text: string;
|
||||
};
|
||||
|
||||
export const MenuItemLeftContent = ({ LeftIcon, text }: OwnProps) => {
|
||||
export const MenuItemLeftContent = ({
|
||||
isDraggable,
|
||||
LeftIcon,
|
||||
text,
|
||||
}: OwnProps) => {
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
<StyledMenuItemLeftContent>
|
||||
{isDraggable && (
|
||||
<IconGripVertical
|
||||
size={theme.icon.size.md}
|
||||
stroke={theme.icon.stroke.sm}
|
||||
/>
|
||||
)}
|
||||
{LeftIcon && (
|
||||
<LeftIcon size={theme.icon.size.md} stroke={theme.icon.stroke.sm} />
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user