docs: fix pagination on mobile devices (#7968)
* docs: fix pagination on mobile devices * fix algolia link
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"crons": [{
|
"crons": [{
|
||||||
"path": "/v2/api/algolia",
|
"path": "/v2/api/api/algolia",
|
||||||
"schedule": "0 0 * * 4"
|
"schedule": "0 0 * * 4"
|
||||||
}],
|
}],
|
||||||
"framework": "nextjs",
|
"framework": "nextjs",
|
||||||
|
|||||||
@@ -4,12 +4,18 @@ import React from "react"
|
|||||||
import { usePagination } from "../../providers"
|
import { usePagination } from "../../providers"
|
||||||
import { Card } from "../Card"
|
import { Card } from "../Card"
|
||||||
import { ChevronLeft, ChevronRight } from "@medusajs/icons"
|
import { ChevronLeft, ChevronRight } from "@medusajs/icons"
|
||||||
|
import clsx from "clsx"
|
||||||
|
|
||||||
export const Pagination = () => {
|
export const Pagination = () => {
|
||||||
const { previousPage, nextPage } = usePagination()
|
const { previousPage, nextPage } = usePagination()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex justify-between">
|
<div
|
||||||
|
className={clsx(
|
||||||
|
"flex justify-between",
|
||||||
|
"flex-col sm:flex-row gap-docs_1 sm:gap-0"
|
||||||
|
)}
|
||||||
|
>
|
||||||
{previousPage && (
|
{previousPage && (
|
||||||
<Card
|
<Card
|
||||||
title={previousPage.title}
|
title={previousPage.title}
|
||||||
@@ -17,7 +23,7 @@ export const Pagination = () => {
|
|||||||
startIcon={<ChevronLeft />}
|
startIcon={<ChevronLeft />}
|
||||||
showLinkIcon={false}
|
showLinkIcon={false}
|
||||||
href={previousPage.link}
|
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 && (
|
{nextPage && (
|
||||||
@@ -27,7 +33,7 @@ export const Pagination = () => {
|
|||||||
endIcon={<ChevronRight />}
|
endIcon={<ChevronRight />}
|
||||||
showLinkIcon={false}
|
showLinkIcon={false}
|
||||||
href={nextPage.link}
|
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>
|
</div>
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ export const TightLayout = ({
|
|||||||
<div
|
<div
|
||||||
className={clsx(
|
className={clsx(
|
||||||
"relative flex w-full flex-1 items-start justify-center",
|
"relative flex w-full flex-1 items-start justify-center",
|
||||||
" px-docs_1 pb-docs_2 pt-docs_7 md:px-docs_2 lg:px-docs_4 lg:py-docs_7"
|
"px-docs_1 pb-docs_2 pt-docs_7 md:px-docs_2 lg:px-docs_4 lg:py-docs_7",
|
||||||
|
"mb-docs_4 sm:mb-0"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<main className="h-full w-full lg:max-w-[720px] lg:px-px">
|
<main className="h-full w-full lg:max-w-[720px] lg:px-px">
|
||||||
|
|||||||
Reference in New Issue
Block a user