import clsx from 'clsx'; import Icon from '../Icon/index.js'; import Card from '../Card/index.js'; import styles from './styles.module.css'; export interface PaginatorItem { title: string; permalink: string; label: string; } type Props = { prevItem?: PaginatorItem; nextItem?: PaginatorItem; ariaLabel: string; className?: string; }; function PaginatorCard({ item, direction }: { item: PaginatorItem; direction: 'left' | 'right' }) { const isRight = direction === 'right'; const arrow = ( ); return ( {!isRight && arrow} {item.label} {isRight && arrow} {item.title} ); } export default function Paginator({ prevItem, nextItem, ariaLabel, className }: Props) { if (!prevItem && !nextItem) return null; return ( ); }