popov.link/src/components/Pagination.astro
Valentin Popov 5217bcb24c
All checks were successful
Test / test (push) Successful in 39s
Test / test (pull_request) Successful in 36s
Refactor Pagination component to update page size in getStaticPaths
2024-09-13 00:26:08 +00:00

36 lines
394 B
Plaintext

---
type Props = {
readonly nextUrl?: string;
readonly prevUrl?: string;
};
const { nextUrl, prevUrl } = Astro.props;
---
<style lang="scss">
div {
text-align: center;
}
span {
margin: 0 2em;
}
</style>
<div>
{
prevUrl && (
<span>
<a href={prevUrl}>&lt; Prev</a>
</span>
)
}
{
nextUrl && (
<span>
<a href={nextUrl}>Next &gt;</a>
</span>
)
}
</div>