docs: fix pagination on mobile devices (#7968)

* docs: fix pagination on mobile devices

* fix algolia link
This commit is contained in:
Shahed Nasser
2024-07-05 13:40:42 +03:00
committed by GitHub
parent 276c8b925f
commit de0a9c14ab
3 changed files with 12 additions and 5 deletions
@@ -4,12 +4,18 @@ import React from "react"
import { usePagination } from "../../providers"
import { Card } from "../Card"
import { ChevronLeft, ChevronRight } from "@medusajs/icons"
import clsx from "clsx"
export const Pagination = () => {
const { previousPage, nextPage } = usePagination()
return (
<div className="flex justify-between">
<div
className={clsx(
"flex justify-between",
"flex-col sm:flex-row gap-docs_1 sm:gap-0"
)}
>
{previousPage && (
<Card
title={previousPage.title}
@@ -17,7 +23,7 @@ export const Pagination = () => {
startIcon={<ChevronLeft />}
showLinkIcon={false}
href={previousPage.link}
className="max-w-[45%] ml-0 mr-auto items-center"
className={clsx("ml-0 mr-auto items-center", "w-full sm:max-w-[45%]")}
/>
)}
{nextPage && (
@@ -27,7 +33,7 @@ export const Pagination = () => {
endIcon={<ChevronRight />}
showLinkIcon={false}
href={nextPage.link}
className="max-w-[45%] mr-0 ml-auto items-center"
className={clsx("mr-0 ml-auto items-center", "w-full sm:max-w-[45%]")}
/>
)}
</div>