Alurkerja v1.0.0@Beta

Sidebar

Base

Typescript
import { Sidebar } from 'alurkerja-ui'
import { useState } from 'react'
import Link from 'next/link'
import clsx from 'clsx'

export const SidebarPage = () => {
	const [toogled, setToggled] = useState(false)

	return(
		<Sidebar
		  currentPathName="/"
		  toggled={toogled}
		  setToggled={setToggled}
		  menuWrapper={({ children, menu }) => (
		    <Link href={menu.href}>
		      <>{children}</>
		    </Link>
		  )}
		  menuConfig={[
		    { label: 'Menu1', href: '/menu1' },
		    { label: 'Menu Nested 2', href: '/menu2', child: [{ href: '/menu2/child1', label: 'Child1' }] },
		  ]}
		/>
	)
}