developers.urbit.org/components/Pagination.js
Matilde Park 316f1db756 build: bump fds to 0.4.1, migrate to fds imports
- RenderTree component
- /lib.js now in fds
2022-08-24 15:09:52 -07:00

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: "",
};