Skip to content

Commit 2492991

Browse files
authored
Merge pull request #1611 from dxc-technology/gomezivann/fix-website-quicknav
Fix responsive Quicknav in website
2 parents 3b81157 + 1b4fc76 commit 2492991

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

website/screens/common/QuickNavContainer.tsx

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22
import styled from "styled-components";
3-
import { DxcFlex, DxcGrid, DxcQuickNav } from "@dxc-technology/halstack-react";
3+
import { DxcGrid, DxcQuickNav } from "@dxc-technology/halstack-react";
44
import Section from "./Section";
55
import { responsiveSizes } from "../common/variables";
66

@@ -42,8 +42,8 @@ const DxcQuickNavContainer = ({
4242
sections,
4343
startHeadingLevel = 1,
4444
}: QuickNavContainerTypes): JSX.Element => (
45-
<DxcGrid templateColumns={["15fr", "5fr"]} gap="1.5rem">
46-
<DxcFlex direction="column" gap="3rem">
45+
<MainContainer>
46+
<DxcGrid gap="3rem">
4747
{sections.map((section) => (
4848
<Section
4949
title={section.title}
@@ -54,17 +54,28 @@ const DxcQuickNavContainer = ({
5454
{section.content}
5555
</Section>
5656
))}
57-
</DxcFlex>
57+
</DxcGrid>
5858
<QuickNavContainer>
5959
<DxcQuickNav title={title} links={getSubSectionsLinks(sections)} />
6060
</QuickNavContainer>
61-
</DxcGrid>
61+
</MainContainer>
6262
);
6363

64+
const MainContainer = styled.div`
65+
display: grid;
66+
grid-template-columns: 15fr 5fr;
67+
gap: 1.5rem;
68+
69+
@media (max-width: ${responsiveSizes.laptop}px) {
70+
grid-template-columns: 1fr;
71+
}
72+
`;
73+
6474
const QuickNavContainer = styled.div`
6575
position: sticky;
6676
top: calc(64px + 24px);
6777
max-height: 568px;
78+
overflow-x: hidden;
6879
overflow-y: auto;
6980
7081
@media (max-width: ${responsiveSizes.laptop}px) {

0 commit comments

Comments
 (0)