Skip to content

Commit 9f4071f

Browse files
committed
adapt LvlAccordion
1 parent 553c152 commit 9f4071f

File tree

2 files changed

+29
-5
lines changed

2 files changed

+29
-5
lines changed

src/components/Nav/Mobile/LvlAccordion.tsx

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ const LvlAccordion = ({
4444
const isActivePage = isLink && cleanPath(asPath) === action.href
4545
if (isLink)
4646
return (
47-
<AccordionItem key={label}>
47+
<AccordionItem
48+
key={label}
49+
borderTop="1px"
50+
borderColor="inherit"
51+
_last={{ borderBottomWidth: "1px" }}
52+
>
4853
<Button
4954
as={BaseLink}
5055
w="full"
@@ -92,7 +97,12 @@ const LvlAccordion = ({
9297
</AccordionItem>
9398
)
9499
return (
95-
<AccordionItem key={label}>
100+
<AccordionItem
101+
key={label}
102+
borderTop="1px"
103+
borderColor="inherit"
104+
_last={{ borderBottomWidth: "1px" }}
105+
>
96106
{({ isExpanded }) => (
97107
<>
98108
<Heading
@@ -137,7 +147,11 @@ const LvlAccordion = ({
137147
</AccordionButton>
138148
</Heading>
139149

140-
<AccordionPanel p="0" bg={menuColors.lvl[lvl + 1].background}>
150+
<AccordionPanel
151+
p="0"
152+
mt="0"
153+
bg={menuColors.lvl[lvl + 1].background}
154+
>
141155
<LvlAccordion
142156
lvl={(lvl + 1) as Level}
143157
items={action.items}

src/components/Nav/Mobile/MenuBody.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ const MenuBody = ({ linkSections, onToggle }: MenuBodyProps) => {
3535
{SECTION_LABELS.map((key) => {
3636
const { label, items } = linkSections[key]
3737
return (
38-
<AccordionItem key={label}>
38+
<AccordionItem
39+
key={label}
40+
borderTop="1px"
41+
borderColor="inherit"
42+
_last={{ borderBottomWidth: "1px" }}
43+
>
3944
{({ isExpanded }) => (
4045
<>
4146
<Heading
@@ -63,6 +68,7 @@ const MenuBody = ({ linkSections, onToggle }: MenuBodyProps) => {
6368
justifyContent="start"
6469
gap="2"
6570
_hover={{ bg: "none" }}
71+
px="4"
6672
py="4"
6773
>
6874
<ExpandIcon isOpen={isExpanded} />
@@ -78,7 +84,11 @@ const MenuBody = ({ linkSections, onToggle }: MenuBodyProps) => {
7884
</AccordionButton>
7985
</Heading>
8086

81-
<AccordionPanel p="0" bg={menuColors.lvl[2].background}>
87+
<AccordionPanel
88+
p="0"
89+
mt="0"
90+
bg={menuColors.lvl[2].background}
91+
>
8292
<LvlAccordion
8393
lvl={2 as Level}
8494
items={items}

0 commit comments

Comments
 (0)