Skip to content

Commit 443e2ae

Browse files
committed
chore: move sidebar icons to only root level
1 parent 70e5a79 commit 443e2ae

File tree

3 files changed

+29
-81
lines changed

3 files changed

+29
-81
lines changed

src/components/Navigation.module.css

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
display: flex;
33
width: 100%;
44
align-items: center;
5-
justify-content: space-between;
65
border-radius: 0.375rem;
76
text-align: left;
87
line-height: 1.5;

src/components/Navigation.tsx

+15-8
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,9 @@ function ItemLink({
3535
onClick={item.href ? onLinkClick : undefined}
3636
className={clsx(styles.item, className, isSelected && styles.selected)}
3737
>
38-
<NavIcon
39-
icon={item.icon}
40-
aria-hidden="true"
41-
className="ml-1 fill-inherit stroke-inherit text-inherit"
42-
/>
43-
{item.title}
38+
<span className="ml-6">
39+
{item.title}
40+
</span>
4441
</Link>
4542
)
4643
}
@@ -59,12 +56,17 @@ export function Navigation({
5956
<Link
6057
href="/quickstart"
6158
className={clsx(
62-
'flex w-full items-center justify-between rounded-md pb-1 text-left leading-6',
59+
'flex w-full items-center rounded-md pb-1 text-left leading-6',
6360
pathname.includes('/quickstart')
6461
? 'text-sky-500'
6562
: 'hover:text-gray-900 dark:hover:text-gray-300',
6663
)}
6764
>
65+
<NavIcon
66+
icon={"home"}
67+
aria-hidden="true"
68+
className="ml-1 fill-inherit stroke-inherit text-inherit"
69+
/>
6870
Quickstart Guide
6971
</Link>
7072
{navigation.map((section) => {
@@ -84,14 +86,19 @@ export function Navigation({
8486
section.href !== '' && pathname.includes(section.href),
8587
)}
8688
>
89+
<NavIcon
90+
icon={section.icon}
91+
aria-hidden="true"
92+
className="ml-1 fill-inherit stroke-inherit text-inherit"
93+
/>
8794
{section.title}
8895
<Icon
8996
icon="chevron"
9097
className={clsx(
9198
open
9299
? 'rotate-90 '
93100
: 'text-gray-600 dark:text-gray-400',
94-
'w-5 shrink-0',
101+
'ml-auto w-5 shrink-0',
95102
pathname.includes(section.href) &&
96103
'text-gray-900 dark:text-gray-200',
97104
)}

0 commit comments

Comments
 (0)