mirror of
https://github.com/Snigdha-OS/documentation.git
synced 2025-09-14 20:24:56 +02:00
48 lines
1.4 KiB
JavaScript
48 lines
1.4 KiB
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
import React from 'react';
|
|
import Translate, {translate} from '@docusaurus/Translate';
|
|
import PaginatorNavLink from '@theme/PaginatorNavLink';
|
|
export default function BlogPostPaginator(props) {
|
|
const {nextItem, prevItem} = props;
|
|
return (
|
|
<nav
|
|
className="pagination-nav docusaurus-mt-lg"
|
|
aria-label={translate({
|
|
id: 'theme.blog.post.paginator.navAriaLabel',
|
|
message: 'Blog post page navigation',
|
|
description: 'The ARIA label for the blog posts pagination',
|
|
})}>
|
|
{prevItem && (
|
|
<PaginatorNavLink
|
|
{...prevItem}
|
|
subLabel={
|
|
<Translate
|
|
id="theme.blog.post.paginator.newerPost"
|
|
description="The blog post button label to navigate to the newer/previous post">
|
|
Newer Post
|
|
</Translate>
|
|
}
|
|
/>
|
|
)}
|
|
{nextItem && (
|
|
<PaginatorNavLink
|
|
{...nextItem}
|
|
subLabel={
|
|
<Translate
|
|
id="theme.blog.post.paginator.olderPost"
|
|
description="The blog post button label to navigate to the older/next post">
|
|
Older Post
|
|
</Translate>
|
|
}
|
|
isNext
|
|
/>
|
|
)}
|
|
</nav>
|
|
);
|
|
}
|