File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change 11import React from "react" ;
22import styled from "styled-components" ;
3- import { DxcFlex , DxcGrid , DxcQuickNav } from "@dxc-technology/halstack-react" ;
3+ import { DxcGrid , DxcQuickNav } from "@dxc-technology/halstack-react" ;
44import Section from "./Section" ;
55import { 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+
6474const 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) {
You can’t perform that action at this time.
0 commit comments