mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 10:20:09 +02:00
* feat(v2): Add pagination * çhore(v2): remove console.log * feat(v2): remove changes in template
36 lines
978 B
JavaScript
36 lines
978 B
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 Link from '@docusaurus/Link';
|
|
|
|
function BlogPostPaginator(props) {
|
|
const {nextItem, prevItem} = props;
|
|
|
|
return (
|
|
<nav aria-label="Blog post page navigation" className="my-5">
|
|
<ul className="pagination justify-content-between">
|
|
<li className="page-item">
|
|
{prevItem && (
|
|
<Link className="page-link rounded-pill" to={prevItem.permalink}>
|
|
« {prevItem.title}
|
|
</Link>
|
|
)}
|
|
</li>
|
|
<li className="page-item">
|
|
{nextItem && (
|
|
<Link className="page-link rounded-pill" to={nextItem.permalink}>
|
|
{nextItem.title} »
|
|
</Link>
|
|
)}
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
);
|
|
}
|
|
|
|
export default BlogPostPaginator;
|