Search dialog fullscreen on mobile (#5765)

I changed the visibility of the search dialog to make it full screen on
mobile, this should already be ok but I couldn't try it on mobile, so I
just used devtools, if I need to do something else on this PR just tell
me :)
This PR aims to fix: #5746

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
This commit is contained in:
RobertoSimonini1
2024-06-07 17:09:09 +02:00
committed by GitHub
parent 908990315d
commit e9cf449706
4 changed files with 25 additions and 19 deletions

View File

@ -2,6 +2,8 @@ import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { IconComponent } from 'twenty-ui';
import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';
import {
StyledMenuItemLabel,
StyledMenuItemLeftContent,
@ -83,6 +85,7 @@ export const MenuItemCommand = ({
onClick,
}: MenuItemCommandProps) => {
const theme = useTheme();
const isMobile = useIsMobile();
return (
<StyledMenuItemCommandContainer
@ -100,10 +103,12 @@ export const MenuItemCommand = ({
{text}
</StyledMenuItemLabelText>
</StyledMenuItemLeftContent>
<MenuItemCommandHotKeys
firstHotKey={firstHotKey}
secondHotKey={secondHotKey}
/>
{!isMobile && (
<MenuItemCommandHotKeys
firstHotKey={firstHotKey}
secondHotKey={secondHotKey}
/>
)}
</StyledMenuItemCommandContainer>
);
};

View File

@ -8,6 +8,7 @@ const StyledContainer = styled.div`
gap: ${({ theme }) => theme.spacing(4)};
justify-content: center;
padding: ${({ theme }) => theme.spacing(3)};
z-index: 1001;
`;
type NavigationBarProps = {