Skip to content

Commit

Permalink
Added new label for mobile navigation (shadcn-ui#2182)
Browse files Browse the repository at this point in the history
- Update the `mobile-nav` component and added `new` label if `item.label` is present in the `docsConfig.sidebarNav`.

![image](https://github.com/shadcn-ui/ui/assets/70029024/e19eddf4-22bb-4afe-8158-ea795ea0c5c0)
  • Loading branch information
strlrd-29 authored Dec 26, 2023
1 parent f60945c commit e3d5377
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/www/components/mobile-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ export function MobileNav() {
className="text-muted-foreground"
>
{item.title}
{item.label && (
<span className="ml-2 rounded-md bg-[#adfa1d] px-1.5 py-0.5 text-xs leading-none text-[#000000] no-underline group-hover:no-underline">
{item.label}
</span>
)}
</MobileLink>
) : (
item.title
Expand Down

0 comments on commit e3d5377

Please sign in to comment.