Raphaël Bosi
2025-01-24 16:10:02 +01:00
committed by GitHub
parent 29df6e64a0
commit ff41768e8f
15 changed files with 438 additions and 221 deletions

View File

@ -4,6 +4,7 @@ import { IconArrowUpRight, IconComponent, MenuItemCommand } from 'twenty-ui';
import { useCommandMenuOnItemClick } from '@/command-menu/hooks/useCommandMenuOnItemClick';
import { useSelectableList } from '@/ui/layout/selectable-list/hooks/useSelectableList';
import { ReactNode } from 'react';
export type CommandMenuItemProps = {
label: string;
@ -14,6 +15,7 @@ export type CommandMenuItemProps = {
firstHotKey?: string;
secondHotKey?: string;
shouldCloseCommandMenuOnClick?: boolean;
RightComponent?: ReactNode;
};
export const CommandMenuItem = ({
@ -25,6 +27,7 @@ export const CommandMenuItem = ({
firstHotKey,
secondHotKey,
shouldCloseCommandMenuOnClick,
RightComponent,
}: CommandMenuItemProps) => {
const { onItemClick } = useCommandMenuOnItemClick();
@ -49,6 +52,7 @@ export const CommandMenuItem = ({
})
}
isSelected={isSelectedItemId}
RightComponent={RightComponent}
/>
);
};