on master help sign in
urbit.org/components/Pagination.js
22 lines 620 B history raw
1import Link from "next/link";
2export default function Pagination(props) {
3 return (
4 <Link
5 href={`/${props.section}/${props.post.slug}`}
6 key={`post-${props.post.slug}`}
7 >
8 <div
9 className="bg-wall-100 cursor-pointer font-semibold p-2 px-4 rounded-xl flex"
10 style={{ maxWidth: "45%" }}
11 >
12 <p className="shrink-0 pr-1">{props.previous ? "<- " : ""}</p>
13 <p className="text-wall-600 truncate">{props.post.title}</p>
14 <p className="shrink-0 pl-1">{props.next ? " ->" : ""}</p>
15 </div>
16 </Link>
17 );
20Pagination.defaultProps = {
21 className: "",
22};