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:
@ -8,6 +8,7 @@ import {
|
||||
|
||||
import { IconComponent } from '@ui/display';
|
||||
import { useIsMobile } from '@ui/utilities/responsive/hooks/useIsMobile';
|
||||
import { ReactNode } from 'react';
|
||||
import { MenuItemCommandHotKeys } from './MenuItemCommandHotKeys';
|
||||
|
||||
const StyledMenuItemLabelText = styled(StyledMenuItemLabel)`
|
||||
@ -72,6 +73,7 @@ export type MenuItemCommandProps = {
|
||||
className?: string;
|
||||
isSelected?: boolean;
|
||||
onClick?: () => void;
|
||||
RightComponent?: ReactNode;
|
||||
};
|
||||
|
||||
export const MenuItemCommand = ({
|
||||
@ -82,6 +84,7 @@ export const MenuItemCommand = ({
|
||||
className,
|
||||
isSelected,
|
||||
onClick,
|
||||
RightComponent,
|
||||
}: MenuItemCommandProps) => {
|
||||
const theme = useTheme();
|
||||
const isMobile = useIsMobile();
|
||||
@ -99,6 +102,7 @@ export const MenuItemCommand = ({
|
||||
</StyledBigIconContainer>
|
||||
)}
|
||||
<StyledMenuItemLabelText>{text}</StyledMenuItemLabelText>
|
||||
{RightComponent}
|
||||
</StyledMenuItemLeftContent>
|
||||
{!isMobile && (
|
||||
<MenuItemCommandHotKeys
|
||||
|
||||
Reference in New Issue
Block a user