mirror of
https://github.com/urbit/developers.urbit.org.git
synced 2024-09-11 13:55:59 +03:00
24 lines
621 B
JavaScript
24 lines
621 B
JavaScript
import Link from "next/link";
|
|
|
|
export default function Pagination(props) {
|
|
return (
|
|
<Link
|
|
href={`/${props.section}/${props.post.slug}`}
|
|
key={`post-${props.post.slug}`}
|
|
>
|
|
<div
|
|
className="bg-wall-100 cursor-pointer font-semibold p-2 px-4 rounded-xl flex"
|
|
style={{ maxWidth: "45%" }}
|
|
>
|
|
<p className="shrink-0 pr-1">{props.previous ? "<- " : ""}</p>
|
|
<p className="text-wall-600 truncate">{props.post.title}</p>
|
|
<p className="shrink-0 pl-1">{props.next ? " ->" : ""}</p>
|
|
</div>
|
|
</Link>
|
|
);
|
|
}
|
|
|
|
Pagination.defaultProps = {
|
|
className: "",
|
|
};
|