250 implement restore context button on command menu (#9836)
Closes https://github.com/twentyhq/core-team-issues/issues/250 https://github.com/user-attachments/assets/9c120188-497d-4273-9137-f8d0de3bd884
This commit is contained in:
@ -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}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user