-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.js
More file actions
40 lines (36 loc) · 1.2 KB
/
index.js
File metadata and controls
40 lines (36 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/**
* 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 className="pagination-nav" aria-label="Blog post page navigation">
<div className="pagination-nav__item">
{prevItem && (
<Link className="pagination-nav__link" to={prevItem.permalink}>
<div className="pagination-nav__sublabel">上一篇</div>
<div className="pagination-nav__label">
« {prevItem.title}
</div>
</Link>
)}
</div>
<div className="pagination-nav__item pagination-nav__item--next">
{nextItem && (
<Link className="pagination-nav__link" to={nextItem.permalink}>
<div className="pagination-nav__sublabel">下一篇</div>
<div className="pagination-nav__label">
{nextItem.title} »
</div>
</Link>
)}
</div>
</nav>
);
}
export default BlogPostPaginator;