add optional className prop to NavLink component and reduce Foundation section padding
This commit is contained in:
@@ -1,16 +1,20 @@
|
|||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
|
import clsx from 'clsx'
|
||||||
|
|
||||||
export function NavLink({
|
type NavLinkProps = {
|
||||||
href,
|
|
||||||
children,
|
|
||||||
}: {
|
|
||||||
href: string
|
href: string
|
||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
}) {
|
className?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export function NavLink({ href, children, className }: NavLinkProps) {
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
href={href}
|
href={href}
|
||||||
className="inline-block rounded-lg px-2 py-1 text-base text-slate-700 hover:bg-slate-100 hover:text-slate-900"
|
className={clsx(
|
||||||
|
'inline-block rounded-lg px-2 py-1 text-base text-slate-700 hover:bg-slate-100 hover:text-slate-900',
|
||||||
|
className,
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ const foundations = [
|
|||||||
|
|
||||||
export function Foundation() {
|
export function Foundation() {
|
||||||
return (
|
return (
|
||||||
<div className="bg-transparent py-16">
|
<div className="bg-transparent py-12">
|
||||||
<div className="mx-auto max-w-7xl px-6 lg:px-8">
|
<div className="mx-auto max-w-7xl px-6 lg:px-8">
|
||||||
<div className="mx-auto grid max-w-2xl grid-cols-1 gap-16 sm:gap-y-20 lg:mx-0 lg:max-w-none lg:grid-cols-5">
|
<div className="mx-auto grid max-w-2xl grid-cols-1 gap-16 sm:gap-y-20 lg:mx-0 lg:max-w-none lg:grid-cols-5">
|
||||||
<div className="col-span-2">
|
<div className="col-span-2">
|
||||||
|
|||||||
Reference in New Issue
Block a user