import React from "react" import * as cn from "./NavLinks.styles"; export interface NavLinksProps { prev?: { title: string href: string } next?: { title: string href: string } as?: React.ElementType className?: string children?: React.ReactNode } export function NavLinks( props: NavLinksProps ) { const Link = props.as || $Anchor return ( {React.Children.count(props.children) > 0 ? (
{props.children}
) : null}
{props.prev ? ( <$ArrowLeftIcon part="icon" /> {props.prev.title} ) :
} {props.next && ( {props.next.title} <$ArrowRightIcon part="icon" /> )}
) } function $Anchor({ children, ...rest }) { return {children} } function $ArrowRightIcon(props: React.SVGProps) { return } function $ArrowLeftIcon(props: React.SVGProps) { return }