Skip to content

Commit 6dc48dc

Browse files
authored
feat: Mark external links in the sidebar (#6523)
1 parent 70ea26e commit 6dc48dc

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

components/Containers/Sidebar/SidebarItem/index.module.css

+13-1
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,23 @@
66
dark:text-neutral-200;
77

88
a {
9+
@apply inline-flex
10+
items-center
11+
gap-2
12+
p-2;
13+
}
14+
15+
.label {
916
@apply w-full
10-
p-2
1117
text-sm
1218
font-regular;
1319
}
20+
21+
.icon {
22+
@apply size-3
23+
text-neutral-500
24+
dark:text-neutral-200;
25+
}
1426
}
1527

1628
.active {

components/Containers/Sidebar/SidebarItem/index.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { ArrowUpRightIcon } from '@heroicons/react/24/solid';
12
import type { FC } from 'react';
23

34
import ActiveLink from '@/components/Common/ActiveLink';
@@ -13,7 +14,9 @@ type SidebarItemProps = {
1314
const SidebarItem: FC<SidebarItemProps> = ({ label, link }) => (
1415
<li className={styles.sideBarItem}>
1516
<ActiveLink href={link} activeClassName={styles.active}>
16-
{label}
17+
<span className={styles.label}>{label}</span>
18+
19+
{link.startsWith('http') && <ArrowUpRightIcon className={styles.icon} />}
1720
</ActiveLink>
1821
</li>
1922
);

0 commit comments

Comments
 (0)