35 lines
1.0 KiB
React
35 lines
1.0 KiB
React
|
const navigation = [
|
||
|
{ name: 'Dashboard', href: '#', current: true },
|
||
|
{ name: 'Team', href: '#', current: false },
|
||
|
{ name: 'Projects', href: '#', current: false },
|
||
|
{ name: 'Calendar', href: '#', current: false },
|
||
|
{ name: 'Documents', href: '#', current: false },
|
||
|
{ name: 'Reports', href: '#', current: false },
|
||
|
]
|
||
|
|
||
|
function classNames(...classes) {
|
||
|
return classes.filter(Boolean).join(' ')
|
||
|
}
|
||
|
|
||
|
export default function Example() {
|
||
|
return (
|
||
|
<nav className="flex flex-1 flex-col" aria-label="Sidebar">
|
||
|
<ul role="list" className="-mx-2 space-y-1">
|
||
|
{navigation.map((item) => (
|
||
|
<li key={item.name}>
|
||
|
<a
|
||
|
href={item.href}
|
||
|
className={classNames(
|
||
|
item.current ? 'bg-gray-50 text-indigo-600' : 'text-gray-700 hover:text-indigo-600 hover:bg-gray-50',
|
||
|
'group flex gap-x-3 rounded-md p-2 pl-3 text-sm leading-6 font-semibold'
|
||
|
)}
|
||
|
>
|
||
|
{item.name}
|
||
|
</a>
|
||
|
</li>
|
||
|
))}
|
||
|
</ul>
|
||
|
</nav>
|
||
|
)
|
||
|
}
|