MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / PaginationCard

Function PaginationCard

apps/docs/src/components/PaginationView.tsx:36–83  ·  view source on GitHub ↗
({
  href,
  label,
  title,
  type,
  isRtl,
}: {
  href: string;
  label: string;
  title: string;
  type: "prev" | "next";
  isRtl: boolean;
})

Source from the content-addressed store, hash-verified

34}
35
36function PaginationCard({
37 href,
38 label,
39 title,
40 type,
41 isRtl,
42}: {
43 href: string;
44 label: string;
45 title: string;
46 type: "prev" | "next";
47 isRtl: boolean;
48}) {
49 const arrowDirection = type === "prev" !== isRtl ? "left" : "right";
50 const rel = type === "prev" ? "prev" : "next";
51
52 return (
53 <a
54 className="group relative grid min-h-24 grid-cols-[2.25rem_minmax(0,1fr)] items-center gap-3 overflow-hidden rounded-lg border border-[var(--bs-doc-line)] bg-[color-mix(in_srgb,var(--bs-doc-panel)_46%,transparent)] p-4 text-[var(--sl-color-text)] no-underline transition-colors hover:border-[color-mix(in_srgb,var(--sl-color-accent)_38%,var(--bs-doc-line))] hover:bg-[color-mix(in_srgb,var(--sl-color-accent)_5%,transparent)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--sl-color-accent)] min-[640px]:p-5"
55 href={href}
56 rel={rel}
57 >
58 <span
59 className={
60 type === "next"
61 ? "order-2 grid h-9 w-9 place-items-center justify-self-end rounded-md border border-[var(--bs-doc-line)] text-[color-mix(in_srgb,var(--sl-color-accent)_76%,white)] transition-colors group-hover:border-[color-mix(in_srgb,var(--sl-color-accent)_46%,transparent)] group-hover:bg-[color-mix(in_srgb,var(--sl-color-accent)_7%,transparent)] min-[640px]:order-none"
62 : "grid h-9 w-9 place-items-center rounded-md border border-[var(--bs-doc-line)] text-[color-mix(in_srgb,var(--sl-color-accent)_76%,white)] transition-colors group-hover:border-[color-mix(in_srgb,var(--sl-color-accent)_46%,transparent)] group-hover:bg-[color-mix(in_srgb,var(--sl-color-accent)_7%,transparent)]"
63 }
64 >
65 <ArrowIcon direction={arrowDirection} />
66 </span>
67 <span
68 className={
69 type === "next"
70 ? "grid min-w-0 gap-2 text-left min-[640px]:text-right"
71 : "grid min-w-0 gap-2 text-left"
72 }
73 >
74 <span className="text-[0.72rem] font-black uppercase leading-none text-[var(--sl-color-gray-3)]">
75 {label}
76 </span>
77 <span className="min-w-0 text-balance text-[1.15rem] font-extrabold leading-tight text-[var(--sl-color-white)] min-[760px]:text-[1.35rem]">
78 {title}
79 </span>
80 </span>
81 </a>
82 );
83}
84
85export default function PaginationView({
86 dir,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected