Skip to content

Commit dcc5d0f

Browse files
committed
Adds trailingIcon props
1 parent e086fe1 commit dcc5d0f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

apps/webapp/app/components/navigation/SideMenuItem.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ export function SideMenuItem({
1010
icon,
1111
activeIconColor,
1212
inactiveIconColor,
13+
trailingIcon,
14+
trailingIconClassName,
1315
name,
1416
to,
1517
badge,
@@ -19,6 +21,8 @@ export function SideMenuItem({
1921
icon?: RenderIcon;
2022
activeIconColor?: string;
2123
inactiveIconColor?: string;
24+
trailingIcon?: RenderIcon;
25+
trailingIconClassName?: string;
2226
name: string;
2327
to: string;
2428
badge?: ReactNode;
@@ -68,6 +72,12 @@ export function SideMenuItem({
6872
{badge}
6973
</motion.div>
7074
)}
75+
{trailingIcon && !isCollapsed && (
76+
<Icon
77+
icon={trailingIcon}
78+
className={cn("ml-1 size-4 shrink-0", trailingIconClassName)}
79+
/>
80+
)}
7181
</motion.div>
7282
</Link>
7383
}

0 commit comments

Comments
 (0)