Skip to content

Commit

Permalink
fix navigation panel workspace picker padding (#6062)
Browse files Browse the repository at this point in the history
## Before
<img width="223" alt="Screenshot 2024-06-27 at 15 23 26"
src="https://github.com/twentyhq/twenty/assets/1834158/18cb5e15-352f-4e65-9cff-6e396abe4318">

## After



<img width="229" alt="Screenshot 2024-06-27 at 15 23 07"
src="https://github.com/twentyhq/twenty/assets/1834158/53502c23-d9b4-4967-9e56-26e62e5e50ea">

<img width="225" alt="Screenshot 2024-06-27 at 15 25 23"
src="https://github.com/twentyhq/twenty/assets/1834158/fbb751ba-2bde-44f0-9c70-a9091e9b9012">
  • Loading branch information
Weiko authored Jun 27, 2024
1 parent 3c3bd96 commit 86fa6ec
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';

import { NavigationDrawerCollapseButton } from './NavigationDrawerCollapseButton';

const StyledContainer = styled.div`
const StyledContainer = styled.div<{ isMultiWorkspace: boolean }>`
align-items: center;
display: flex;
gap: ${({ theme, isMultiWorkspace }) =>
!isMultiWorkspace ? theme.spacing(2) : null};
padding: ${({ theme, isMultiWorkspace }) =>
!isMultiWorkspace ? theme.spacing(1) : null};
height: ${({ theme }) => theme.spacing(7)};
user-select: none;
`;
Expand Down Expand Up @@ -53,10 +57,11 @@ export const NavigationDrawerHeader = ({
}: NavigationDrawerHeaderProps) => {
const isMobile = useIsMobile();
const workspaces = useRecoilValue(workspacesState);
const isMultiWorkspace = workspaces !== null && workspaces.length > 1;

return (
<StyledContainer>
{workspaces !== null && workspaces.length > 1 ? (
<StyledContainer isMultiWorkspace={isMultiWorkspace}>
{isMultiWorkspace ? (
<MultiWorkspaceDropdownButton workspaces={workspaces} />
) : (
<>
Expand Down

0 comments on commit 86fa6ec

Please sign in to comment.