Files
fn-design-system/components/nav_link.tsx
T
Egutierrez 5a824c2eee initial: mirror of @fn_library from fn_registry
75 components + DESIGN_SYSTEM.md + sync script.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 19:06:49 +02:00

45 lines
792 B
TypeScript

import * as React from 'react'
import { NavLink } from '@mantine/core'
interface FnNavLinkProps {
label: string
description?: string
icon?: React.ReactNode
active?: boolean
onClick?: React.MouseEventHandler<HTMLButtonElement>
href?: string
children?: React.ReactNode
opened?: boolean
defaultOpened?: boolean
}
function FnNavLink({
label,
description,
icon,
active,
onClick,
href,
children,
opened,
defaultOpened,
}: FnNavLinkProps) {
return (
<NavLink
label={label}
description={description}
leftSection={icon}
active={active}
onClick={onClick}
href={href}
opened={opened}
defaultOpened={defaultOpened}
>
{children}
</NavLink>
)
}
export { FnNavLink }
export type { FnNavLinkProps }