File tree Expand file tree Collapse file tree 1 file changed +23
-28
lines changed
src/components/TableOfContents Expand file tree Collapse file tree 1 file changed +23
-28
lines changed Original file line number Diff line number Diff line change 4
4
Box ,
5
5
BoxProps ,
6
6
calc ,
7
+ Flex ,
7
8
Icon ,
8
9
List ,
9
- ListItem ,
10
10
useToken ,
11
11
} from "@chakra-ui/react"
12
12
@@ -67,7 +67,10 @@ const TableOfContents = ({
67
67
}
68
68
69
69
return (
70
- < Box
70
+ < Flex
71
+ direction = "column"
72
+ align = "start"
73
+ gap = { 4 }
71
74
hideBelow = { lgBp }
72
75
as = "aside"
73
76
position = "sticky"
@@ -80,33 +83,25 @@ const TableOfContents = ({
80
83
overflowY = "auto"
81
84
{ ...rest }
82
85
>
83
- < List { ...outerListProps } >
84
- { ! hideEditButton && editPath && (
85
- < ListItem mb = { 2 } >
86
- < ButtonLink
87
- leftIcon = { < Icon as = { FaGithub } /> }
88
- href = { editPath }
89
- variant = "outline"
90
- >
91
- { t ( "edit-page" ) }
92
- </ ButtonLink >
93
- </ ListItem >
94
- ) }
95
- < ListItem >
96
- < Box mb = { 2 } textTransform = "uppercase" >
97
- { t ( "on-this-page" ) }
98
- </ Box >
99
- < List m = { 0 } spacing = "2" >
100
- < ItemsList
101
- items = { items }
102
- depth = { 0 }
103
- maxDepth = { maxDepth ? maxDepth : 1 }
104
- activeHash = { activeHash }
105
- />
106
- </ List >
107
- </ ListItem >
86
+ { ! hideEditButton && editPath && (
87
+ < ButtonLink
88
+ leftIcon = { < Icon as = { FaGithub } /> }
89
+ href = { editPath }
90
+ variant = "outline"
91
+ >
92
+ { t ( "edit-page" ) }
93
+ </ ButtonLink >
94
+ ) }
95
+ < Box textTransform = "uppercase" > { t ( "on-this-page" ) } </ Box >
96
+ < List m = { 0 } spacing = "2" { ...outerListProps } >
97
+ < ItemsList
98
+ items = { items }
99
+ depth = { 0 }
100
+ maxDepth = { maxDepth ? maxDepth : 1 }
101
+ activeHash = { activeHash }
102
+ />
108
103
</ List >
109
- </ Box >
104
+ </ Flex >
110
105
)
111
106
}
112
107
You can’t perform that action at this time.
0 commit comments