2023-05-18 13:56:50 +02:00
|
|
|
import Link from 'next/link'
|
|
|
|
|
2023-07-26 17:38:22 +02:00
|
|
|
export const iconSize = 'h-10 w-10 lg:h-12 lg:w-12'
|
|
|
|
|
2023-05-18 13:56:50 +02:00
|
|
|
export const NavButton = ({
|
|
|
|
href,
|
|
|
|
label,
|
|
|
|
color,
|
|
|
|
children,
|
|
|
|
onClick = false,
|
|
|
|
extraClasses = '',
|
|
|
|
active = false,
|
|
|
|
}) => {
|
|
|
|
const className =
|
2023-07-26 17:38:22 +02:00
|
|
|
'border-0 px-1 lg:px-3 xl:px-4 text-base py-3 md:py-4 text-center flex flex-col items-center 2xl:w-36 ' +
|
2023-07-29 14:21:59 +02:00
|
|
|
`hover:bg-${color} text-${color} hover:text-neutral grow xl:grow-0 relative ${extraClasses} ${
|
2023-05-18 13:56:50 +02:00
|
|
|
active ? 'font-heavy' : ''
|
|
|
|
}`
|
2023-07-26 17:38:22 +02:00
|
|
|
const span = <span className="font-medium text-md hidden md:block md:pt-1 lg:pt-0">{label}</span>
|
2023-05-18 13:56:50 +02:00
|
|
|
|
|
|
|
return onClick ? (
|
|
|
|
<button {...{ onClick, className }} title={label}>
|
|
|
|
{children}
|
|
|
|
{span}
|
|
|
|
</button>
|
|
|
|
) : (
|
|
|
|
<Link {...{ href, className }} title={label}>
|
|
|
|
{children}
|
|
|
|
{span}
|
|
|
|
</Link>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export const NavSpacer = () => (
|
2023-06-09 19:11:45 +02:00
|
|
|
<div className="hidden xl:block text-base lg:text-4xl font-thin opacity-30 px-0.5 lg:px-2">|</div>
|
2023-05-18 13:56:50 +02:00
|
|
|
)
|