aboutsummaryrefslogtreecommitdiff
path: root/src/components/Pagination.astro
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Pagination.astro')
-rw-r--r--src/components/Pagination.astro36
1 files changed, 7 insertions, 29 deletions
diff --git a/src/components/Pagination.astro b/src/components/Pagination.astro
index e9fbc69..cc85db7 100644
--- a/src/components/Pagination.astro
+++ b/src/components/Pagination.astro
@@ -1,4 +1,7 @@
---
+import Next from "./Pagination/Next.astro";
+import Prev from "./Pagination/Prev.astro";
+
type Props = {
readonly prevUrl?: string;
readonly nextUrl?: string;
@@ -8,39 +11,14 @@ const { prevUrl, nextUrl } = Astro.props;
---
<style lang="scss">
- .pagination {
+ div {
overflow: hidden;
padding: 3rem 0;
width: 100%;
}
-
- .prev,
- .next {
- max-width: 40%;
- }
-
- .prev {
- float: left;
- }
-
- .next {
- float: right;
- }
</style>
-<div class="pagination">
- {
- prevUrl && (
- <span class="prev">
- <a href={prevUrl}>&lt; Prev</a>
- </span>
- )
- }
- {
- nextUrl && (
- <span class="next">
- <a href={nextUrl}>Next &gt;</a>
- </span>
- )
- }
+<div>
+ {prevUrl && <Prev url={prevUrl} />}
+ {nextUrl && <Next url={nextUrl} />}
</div>