Skip to content

Commit 4fd34e2

Browse files
authored
chore(sidebar): use chevron for dropdown (#8997)
1 parent a5b11b7 commit 4fd34e2

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

packages/ui-components/src/Containers/Sidebar/SidebarGroup/index.module.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,25 @@
5050
&::-webkit-details-marker {
5151
display: none;
5252
}
53+
54+
.chevron {
55+
@apply size-3
56+
shrink-0
57+
text-neutral-500
58+
motion-safe:transition-transform
59+
dark:text-neutral-200;
60+
}
5361
}
5462

5563
.subGroup[open] > .summary {
5664
@apply text-brand-600
5765
dark:text-brand-400;
66+
67+
.chevron {
68+
@apply text-brand-600
69+
dark:text-brand-400
70+
rotate-180;
71+
}
5872
}
5973

6074
.subItemList {

packages/ui-components/src/Containers/Sidebar/SidebarGroup/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { ChevronDownIcon } from '@heroicons/react/24/outline';
12
import classNames from 'classnames';
23

34
import SidebarItem from '#ui/Containers/Sidebar/SidebarItem';
@@ -44,7 +45,10 @@ const renderItems = (
4445
return (
4546
<li key={link}>
4647
<details className={styles.subGroup} open={isOpen}>
47-
<summary className={styles.summary}>{label}</summary>
48+
<summary className={styles.summary}>
49+
{label}
50+
<ChevronDownIcon className={styles.chevron} />
51+
</summary>
4852
<ul className={styles.subItemList}>
4953
{renderItems(subItems, props, pathname)}
5054
</ul>

0 commit comments

Comments
 (0)