File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,17 +12,23 @@ export const navigation = [
1212 {
1313 name : 'Tailwind' ,
1414 icon : 'tailwind' ,
15- href : '/docs/tailwind'
15+ href : '/docs/tailwind' ,
16+ disabled : true ,
17+ badge : 'Upcoming'
1618 } ,
1719 {
1820 name : 'Headless' ,
1921 icon : 'pi pi-hammer' ,
20- href : '/docs/headless'
22+ href : '/docs/headless' ,
23+ disabled : true ,
24+ badge : 'Upcoming'
2125 } ,
2226 {
2327 name : 'Primitives' ,
2428 icon : 'pi pi-bullseye' ,
25- href : '/docs/primitives'
29+ href : '/docs/primitives' ,
30+ disabled : true ,
31+ badge : 'Upcoming'
2632 }
2733] ;
2834
Original file line number Diff line number Diff line change 11'use client' ;
2+ import { menu , navigation } from '@/assets/menu/navigation' ;
23import Link from 'next/link' ;
34import { usePathname } from 'next/navigation' ;
4- import { navigation , menu } from '@/assets/menu/navigation' ;
55import * as React from 'react' ;
66import { TailwindLogoIcon } from '../icons' ;
77
@@ -28,8 +28,9 @@ export default function DocSidebar() {
2828 { navigation . map ( ( nav , i ) => (
2929 < Link
3030 key = { nav . name + i }
31- className = "group h-8 rounded-lg px-3 flex items-center gap-3 text-sm font-medium text-surface-600 dark:text-surface-400 hover:bg-surface-200/50 hover:text-surface-900 dark:hover:bg-surface-900 dark:hover:text-surface-0 data-active:bg-primary-500/10 dark:data-active:bg-primary-400/10 data-active:text-primary!"
31+ className = "group h-8 rounded-lg px-3 flex items-center gap-3 text-sm font-medium text-surface-600 dark:text-surface-400 hover:bg-surface-200/50 hover:text-surface-900 dark:hover:bg-surface-900 dark:hover:text-surface-0 data-active:bg-primary-500/10 dark:data-active:bg-primary-400/10 data-active:text-primary! aria-disabled:pointer-events-none "
3232 href = { nav . href }
33+ aria-disabled = { nav . disabled }
3334 { ...( pathname . startsWith ( nav . href ) ? { 'data-active' : '' } : { } ) }
3435 >
3536 { nav . icon === 'tailwind' ? (
@@ -40,6 +41,11 @@ export default function DocSidebar() {
4041 < i className = { `pi ${ nav . icon } text-sm!` } />
4142 ) }
4243 { nav . name }
44+ { 'badge' in nav && nav ?. badge && (
45+ < span className = "uppercase flex items-center justify-center px-1 py-0.5 rounded-sm bg-primary-500/10 dark:bg-primary-400/10 border border-primary-500/15 dark:border-primary-400/15 text-primary font-bold text-[10px] tracking-tight leading-none ml-auto mr-0" >
46+ { nav . badge }
47+ </ span >
48+ ) }
4349 </ Link >
4450 ) ) }
4551 </ div >
You can’t perform that action at this time.
0 commit comments