@docusaurus/theme-classic 0.0.0-4333 → 0.0.0-4342
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/theme-classic.d.ts +12 -12
- package/lib-next/theme/BlogListPaginator/index.js +12 -12
- package/lib-next/theme/BlogPostPaginator/index.js +11 -15
- package/lib-next/theme/DocPaginator/index.js +26 -4
- package/lib-next/theme/PaginatorNavLink/index.js +20 -0
- package/package.json +12 -12
- package/src/theme/BlogListPaginator/index.tsx +12 -12
- package/src/theme/BlogPostPaginator/index.tsx +11 -15
- package/src/theme/DocPaginator/index.tsx +26 -4
- package/src/theme/PaginatorNavLink/index.tsx +22 -0
- package/src/theme-classic.d.ts +12 -12
- package/lib-next/theme/DocPaginatorNavLink/index.js +0 -36
- package/src/theme/DocPaginatorNavLink/index.tsx +0 -38
package/lib/theme-classic.d.ts
CHANGED
|
@@ -129,18 +129,6 @@ declare module '@theme/DocPaginator' {
|
|
|
129
129
|
export default function DocPaginator(props: Props): JSX.Element;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
declare module '@theme/DocPaginatorNavLink' {
|
|
133
|
-
import type {PropNavigationLink} from '@docusaurus/plugin-content-docs';
|
|
134
|
-
|
|
135
|
-
// May be simpler to provide a {navigation: PropNavigation} prop?
|
|
136
|
-
export interface Props {
|
|
137
|
-
navLink: PropNavigationLink;
|
|
138
|
-
next?: boolean;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
export default function DocPaginatorNavLink(props: Props): JSX.Element;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
132
|
declare module '@theme/DocSidebar' {
|
|
145
133
|
import type {PropSidebarItem} from '@docusaurus/plugin-content-docs';
|
|
146
134
|
|
|
@@ -523,6 +511,18 @@ declare module '@theme/NavbarItem' {
|
|
|
523
511
|
export default NavbarItem;
|
|
524
512
|
}
|
|
525
513
|
|
|
514
|
+
declare module '@theme/PaginatorNavLink' {
|
|
515
|
+
import type {ReactNode} from 'react';
|
|
516
|
+
import type {PropNavigationLink} from '@docusaurus/plugin-content-docs';
|
|
517
|
+
|
|
518
|
+
export interface Props extends Omit<PropNavigationLink, 'title'> {
|
|
519
|
+
readonly title: ReactNode;
|
|
520
|
+
readonly subLabel?: JSX.Element;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
export default function PaginatorNavLink(props: Props): JSX.Element;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
526
|
declare module '@theme/SearchBar' {
|
|
527
527
|
export default function SearchBar(): JSX.Element;
|
|
528
528
|
}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import Link from '@docusaurus/Link';
|
|
9
8
|
import Translate, {translate} from '@docusaurus/Translate';
|
|
9
|
+
import PaginatorNavLink from '@theme/PaginatorNavLink';
|
|
10
10
|
|
|
11
11
|
function BlogListPaginator(props) {
|
|
12
12
|
const {metadata} = props;
|
|
@@ -21,30 +21,30 @@ function BlogListPaginator(props) {
|
|
|
21
21
|
})}>
|
|
22
22
|
<div className="pagination-nav__item">
|
|
23
23
|
{previousPage && (
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
<PaginatorNavLink
|
|
25
|
+
permalink={previousPage}
|
|
26
|
+
title={
|
|
27
27
|
<Translate
|
|
28
28
|
id="theme.blog.paginator.newerEntries"
|
|
29
29
|
description="The label used to navigate to the newer blog posts page (previous page)">
|
|
30
30
|
Newer Entries
|
|
31
31
|
</Translate>
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
}
|
|
33
|
+
/>
|
|
34
34
|
)}
|
|
35
35
|
</div>
|
|
36
36
|
<div className="pagination-nav__item pagination-nav__item--next">
|
|
37
37
|
{nextPage && (
|
|
38
|
-
<
|
|
39
|
-
|
|
38
|
+
<PaginatorNavLink
|
|
39
|
+
permalink={nextPage}
|
|
40
|
+
title={
|
|
40
41
|
<Translate
|
|
41
42
|
id="theme.blog.paginator.olderEntries"
|
|
42
43
|
description="The label used to navigate to the older blog posts page (next page)">
|
|
43
44
|
Older Entries
|
|
44
|
-
</Translate>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
</Link>
|
|
45
|
+
</Translate>
|
|
46
|
+
}
|
|
47
|
+
/>
|
|
48
48
|
)}
|
|
49
49
|
</div>
|
|
50
50
|
</nav>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import Translate, {translate} from '@docusaurus/Translate';
|
|
9
|
-
import
|
|
9
|
+
import PaginatorNavLink from '@theme/PaginatorNavLink';
|
|
10
10
|
|
|
11
11
|
function BlogPostPaginator(props) {
|
|
12
12
|
const {nextItem, prevItem} = props;
|
|
@@ -20,34 +20,30 @@ function BlogPostPaginator(props) {
|
|
|
20
20
|
})}>
|
|
21
21
|
<div className="pagination-nav__item">
|
|
22
22
|
{prevItem && (
|
|
23
|
-
<
|
|
24
|
-
|
|
23
|
+
<PaginatorNavLink
|
|
24
|
+
{...prevItem}
|
|
25
|
+
subLabel={
|
|
25
26
|
<Translate
|
|
26
27
|
id="theme.blog.post.paginator.newerPost"
|
|
27
28
|
description="The blog post button label to navigate to the newer/previous post">
|
|
28
29
|
Newer Post
|
|
29
30
|
</Translate>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
« {prevItem.title}
|
|
33
|
-
</div>
|
|
34
|
-
</Link>
|
|
31
|
+
}
|
|
32
|
+
/>
|
|
35
33
|
)}
|
|
36
34
|
</div>
|
|
37
35
|
<div className="pagination-nav__item pagination-nav__item--next">
|
|
38
36
|
{nextItem && (
|
|
39
|
-
<
|
|
40
|
-
|
|
37
|
+
<PaginatorNavLink
|
|
38
|
+
{...nextItem}
|
|
39
|
+
subLabel={
|
|
41
40
|
<Translate
|
|
42
41
|
id="theme.blog.post.paginator.olderPost"
|
|
43
42
|
description="The blog post button label to navigate to the older/next post">
|
|
44
43
|
Older Post
|
|
45
44
|
</Translate>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
{nextItem.title} »
|
|
49
|
-
</div>
|
|
50
|
-
</Link>
|
|
45
|
+
}
|
|
46
|
+
/>
|
|
51
47
|
)}
|
|
52
48
|
</div>
|
|
53
49
|
</nav>
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import {translate} from '@docusaurus/Translate';
|
|
9
|
-
import
|
|
8
|
+
import Translate, {translate} from '@docusaurus/Translate';
|
|
9
|
+
import PaginatorNavLink from '@theme/PaginatorNavLink';
|
|
10
10
|
|
|
11
11
|
function DocPaginator(props) {
|
|
12
12
|
const {previous, next} = props;
|
|
@@ -19,10 +19,32 @@ function DocPaginator(props) {
|
|
|
19
19
|
description: 'The ARIA label for the docs pagination',
|
|
20
20
|
})}>
|
|
21
21
|
<div className="pagination-nav__item">
|
|
22
|
-
{previous &&
|
|
22
|
+
{previous && (
|
|
23
|
+
<PaginatorNavLink
|
|
24
|
+
{...previous}
|
|
25
|
+
subLabel={
|
|
26
|
+
<Translate
|
|
27
|
+
id="theme.docs.paginator.previous"
|
|
28
|
+
description="The label used to navigate to the previous doc">
|
|
29
|
+
Previous
|
|
30
|
+
</Translate>
|
|
31
|
+
}
|
|
32
|
+
/>
|
|
33
|
+
)}
|
|
23
34
|
</div>
|
|
24
35
|
<div className="pagination-nav__item pagination-nav__item--next">
|
|
25
|
-
{next &&
|
|
36
|
+
{next && (
|
|
37
|
+
<PaginatorNavLink
|
|
38
|
+
{...next}
|
|
39
|
+
subLabel={
|
|
40
|
+
<Translate
|
|
41
|
+
id="theme.docs.paginator.next"
|
|
42
|
+
description="The label used to navigate to the next doc">
|
|
43
|
+
Next
|
|
44
|
+
</Translate>
|
|
45
|
+
}
|
|
46
|
+
/>
|
|
47
|
+
)}
|
|
26
48
|
</div>
|
|
27
49
|
</nav>
|
|
28
50
|
);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import Link from '@docusaurus/Link';
|
|
9
|
+
|
|
10
|
+
function PaginatorNavLink(props) {
|
|
11
|
+
const {permalink, title, subLabel} = props;
|
|
12
|
+
return (
|
|
13
|
+
<Link className="pagination-nav__link" to={permalink}>
|
|
14
|
+
{subLabel && <div className="pagination-nav__sublabel">{subLabel}</div>}
|
|
15
|
+
<div className="pagination-nav__label">{title}</div>
|
|
16
|
+
</Link>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default PaginatorNavLink;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/theme-classic",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-4342",
|
|
4
4
|
"description": "Classic theme for Docusaurus",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/theme-classic.d.ts",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"update-code-translations": "node -e 'require(\"./update-code-translations.js\").run()'"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@docusaurus/core": "0.0.0-
|
|
27
|
-
"@docusaurus/plugin-content-blog": "0.0.0-
|
|
28
|
-
"@docusaurus/plugin-content-docs": "0.0.0-
|
|
29
|
-
"@docusaurus/plugin-content-pages": "0.0.0-
|
|
30
|
-
"@docusaurus/theme-common": "0.0.0-
|
|
31
|
-
"@docusaurus/theme-translations": "0.0.0-
|
|
32
|
-
"@docusaurus/utils": "0.0.0-
|
|
33
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
26
|
+
"@docusaurus/core": "0.0.0-4342",
|
|
27
|
+
"@docusaurus/plugin-content-blog": "0.0.0-4342",
|
|
28
|
+
"@docusaurus/plugin-content-docs": "0.0.0-4342",
|
|
29
|
+
"@docusaurus/plugin-content-pages": "0.0.0-4342",
|
|
30
|
+
"@docusaurus/theme-common": "0.0.0-4342",
|
|
31
|
+
"@docusaurus/theme-translations": "0.0.0-4342",
|
|
32
|
+
"@docusaurus/utils": "0.0.0-4342",
|
|
33
|
+
"@docusaurus/utils-validation": "0.0.0-4342",
|
|
34
34
|
"@mdx-js/mdx": "^1.6.21",
|
|
35
35
|
"@mdx-js/react": "^1.6.21",
|
|
36
36
|
"clsx": "^1.1.1",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"rtlcss": "^3.3.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
49
|
-
"@docusaurus/types": "0.0.0-
|
|
48
|
+
"@docusaurus/module-type-aliases": "0.0.0-4342",
|
|
49
|
+
"@docusaurus/types": "0.0.0-4342",
|
|
50
50
|
"@types/mdx-js__react": "^1.5.4",
|
|
51
51
|
"@types/parse-numeric-range": "^0.0.1",
|
|
52
52
|
"@types/rtlcss": "^3.1.1",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"engines": {
|
|
62
62
|
"node": ">=14"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "e9ef727d5f5fefa96d92ad98fa61f3e3e961dd1d"
|
|
65
65
|
}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import Link from '@docusaurus/Link';
|
|
10
9
|
import Translate, {translate} from '@docusaurus/Translate';
|
|
10
|
+
import PaginatorNavLink from '@theme/PaginatorNavLink';
|
|
11
11
|
import type {Props} from '@theme/BlogListPaginator';
|
|
12
12
|
|
|
13
13
|
function BlogListPaginator(props: Props): JSX.Element {
|
|
@@ -24,30 +24,30 @@ function BlogListPaginator(props: Props): JSX.Element {
|
|
|
24
24
|
})}>
|
|
25
25
|
<div className="pagination-nav__item">
|
|
26
26
|
{previousPage && (
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
<PaginatorNavLink
|
|
28
|
+
permalink={previousPage}
|
|
29
|
+
title={
|
|
30
30
|
<Translate
|
|
31
31
|
id="theme.blog.paginator.newerEntries"
|
|
32
32
|
description="The label used to navigate to the newer blog posts page (previous page)">
|
|
33
33
|
Newer Entries
|
|
34
34
|
</Translate>
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
}
|
|
36
|
+
/>
|
|
37
37
|
)}
|
|
38
38
|
</div>
|
|
39
39
|
<div className="pagination-nav__item pagination-nav__item--next">
|
|
40
40
|
{nextPage && (
|
|
41
|
-
<
|
|
42
|
-
|
|
41
|
+
<PaginatorNavLink
|
|
42
|
+
permalink={nextPage}
|
|
43
|
+
title={
|
|
43
44
|
<Translate
|
|
44
45
|
id="theme.blog.paginator.olderEntries"
|
|
45
46
|
description="The label used to navigate to the older blog posts page (next page)">
|
|
46
47
|
Older Entries
|
|
47
|
-
</Translate>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
</Link>
|
|
48
|
+
</Translate>
|
|
49
|
+
}
|
|
50
|
+
/>
|
|
51
51
|
)}
|
|
52
52
|
</div>
|
|
53
53
|
</nav>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import Translate, {translate} from '@docusaurus/Translate';
|
|
10
|
-
import
|
|
10
|
+
import PaginatorNavLink from '@theme/PaginatorNavLink';
|
|
11
11
|
import type {Props} from '@theme/BlogPostPaginator';
|
|
12
12
|
|
|
13
13
|
function BlogPostPaginator(props: Props): JSX.Element {
|
|
@@ -23,34 +23,30 @@ function BlogPostPaginator(props: Props): JSX.Element {
|
|
|
23
23
|
})}>
|
|
24
24
|
<div className="pagination-nav__item">
|
|
25
25
|
{prevItem && (
|
|
26
|
-
<
|
|
27
|
-
|
|
26
|
+
<PaginatorNavLink
|
|
27
|
+
{...prevItem}
|
|
28
|
+
subLabel={
|
|
28
29
|
<Translate
|
|
29
30
|
id="theme.blog.post.paginator.newerPost"
|
|
30
31
|
description="The blog post button label to navigate to the newer/previous post">
|
|
31
32
|
Newer Post
|
|
32
33
|
</Translate>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
« {prevItem.title}
|
|
36
|
-
</div>
|
|
37
|
-
</Link>
|
|
34
|
+
}
|
|
35
|
+
/>
|
|
38
36
|
)}
|
|
39
37
|
</div>
|
|
40
38
|
<div className="pagination-nav__item pagination-nav__item--next">
|
|
41
39
|
{nextItem && (
|
|
42
|
-
<
|
|
43
|
-
|
|
40
|
+
<PaginatorNavLink
|
|
41
|
+
{...nextItem}
|
|
42
|
+
subLabel={
|
|
44
43
|
<Translate
|
|
45
44
|
id="theme.blog.post.paginator.olderPost"
|
|
46
45
|
description="The blog post button label to navigate to the older/next post">
|
|
47
46
|
Older Post
|
|
48
47
|
</Translate>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
{nextItem.title} »
|
|
52
|
-
</div>
|
|
53
|
-
</Link>
|
|
48
|
+
}
|
|
49
|
+
/>
|
|
54
50
|
)}
|
|
55
51
|
</div>
|
|
56
52
|
</nav>
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import {translate} from '@docusaurus/Translate';
|
|
10
|
-
import
|
|
9
|
+
import Translate, {translate} from '@docusaurus/Translate';
|
|
10
|
+
import PaginatorNavLink from '@theme/PaginatorNavLink';
|
|
11
11
|
import type {Props} from '@theme/DocPaginator';
|
|
12
12
|
|
|
13
13
|
function DocPaginator(props: Props): JSX.Element {
|
|
@@ -22,10 +22,32 @@ function DocPaginator(props: Props): JSX.Element {
|
|
|
22
22
|
description: 'The ARIA label for the docs pagination',
|
|
23
23
|
})}>
|
|
24
24
|
<div className="pagination-nav__item">
|
|
25
|
-
{previous &&
|
|
25
|
+
{previous && (
|
|
26
|
+
<PaginatorNavLink
|
|
27
|
+
{...previous}
|
|
28
|
+
subLabel={
|
|
29
|
+
<Translate
|
|
30
|
+
id="theme.docs.paginator.previous"
|
|
31
|
+
description="The label used to navigate to the previous doc">
|
|
32
|
+
Previous
|
|
33
|
+
</Translate>
|
|
34
|
+
}
|
|
35
|
+
/>
|
|
36
|
+
)}
|
|
26
37
|
</div>
|
|
27
38
|
<div className="pagination-nav__item pagination-nav__item--next">
|
|
28
|
-
{next &&
|
|
39
|
+
{next && (
|
|
40
|
+
<PaginatorNavLink
|
|
41
|
+
{...next}
|
|
42
|
+
subLabel={
|
|
43
|
+
<Translate
|
|
44
|
+
id="theme.docs.paginator.next"
|
|
45
|
+
description="The label used to navigate to the next doc">
|
|
46
|
+
Next
|
|
47
|
+
</Translate>
|
|
48
|
+
}
|
|
49
|
+
/>
|
|
50
|
+
)}
|
|
29
51
|
</div>
|
|
30
52
|
</nav>
|
|
31
53
|
);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import Link from '@docusaurus/Link';
|
|
10
|
+
import type {Props} from '@theme/PaginatorNavLink';
|
|
11
|
+
|
|
12
|
+
function PaginatorNavLink(props: Props): JSX.Element {
|
|
13
|
+
const {permalink, title, subLabel} = props;
|
|
14
|
+
return (
|
|
15
|
+
<Link className="pagination-nav__link" to={permalink}>
|
|
16
|
+
{subLabel && <div className="pagination-nav__sublabel">{subLabel}</div>}
|
|
17
|
+
<div className="pagination-nav__label">{title}</div>
|
|
18
|
+
</Link>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default PaginatorNavLink;
|
package/src/theme-classic.d.ts
CHANGED
|
@@ -129,18 +129,6 @@ declare module '@theme/DocPaginator' {
|
|
|
129
129
|
export default function DocPaginator(props: Props): JSX.Element;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
declare module '@theme/DocPaginatorNavLink' {
|
|
133
|
-
import type {PropNavigationLink} from '@docusaurus/plugin-content-docs';
|
|
134
|
-
|
|
135
|
-
// May be simpler to provide a {navigation: PropNavigation} prop?
|
|
136
|
-
export interface Props {
|
|
137
|
-
navLink: PropNavigationLink;
|
|
138
|
-
next?: boolean;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
export default function DocPaginatorNavLink(props: Props): JSX.Element;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
132
|
declare module '@theme/DocSidebar' {
|
|
145
133
|
import type {PropSidebarItem} from '@docusaurus/plugin-content-docs';
|
|
146
134
|
|
|
@@ -523,6 +511,18 @@ declare module '@theme/NavbarItem' {
|
|
|
523
511
|
export default NavbarItem;
|
|
524
512
|
}
|
|
525
513
|
|
|
514
|
+
declare module '@theme/PaginatorNavLink' {
|
|
515
|
+
import type {ReactNode} from 'react';
|
|
516
|
+
import type {PropNavigationLink} from '@docusaurus/plugin-content-docs';
|
|
517
|
+
|
|
518
|
+
export interface Props extends Omit<PropNavigationLink, 'title'> {
|
|
519
|
+
readonly title: ReactNode;
|
|
520
|
+
readonly subLabel?: JSX.Element;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
export default function PaginatorNavLink(props: Props): JSX.Element;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
526
|
declare module '@theme/SearchBar' {
|
|
527
527
|
export default function SearchBar(): JSX.Element;
|
|
528
528
|
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import clsx from 'clsx';
|
|
9
|
-
import Link from '@docusaurus/Link';
|
|
10
|
-
import Translate from '@docusaurus/Translate';
|
|
11
|
-
|
|
12
|
-
function DocPaginatorNavLink(props) {
|
|
13
|
-
const {navLink, next} = props;
|
|
14
|
-
return (
|
|
15
|
-
<Link className={clsx('pagination-nav__link')} to={navLink.permalink}>
|
|
16
|
-
<div className="pagination-nav__sublabel">
|
|
17
|
-
{next ? (
|
|
18
|
-
<Translate
|
|
19
|
-
id="theme.docs.paginator.next"
|
|
20
|
-
description="The label used to navigate to the next doc">
|
|
21
|
-
Next
|
|
22
|
-
</Translate>
|
|
23
|
-
) : (
|
|
24
|
-
<Translate
|
|
25
|
-
id="theme.docs.paginator.previous"
|
|
26
|
-
description="The label used to navigate to the previous doc">
|
|
27
|
-
Previous
|
|
28
|
-
</Translate>
|
|
29
|
-
)}
|
|
30
|
-
</div>
|
|
31
|
-
<div className="pagination-nav__label">{navLink.title}</div>
|
|
32
|
-
</Link>
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export default DocPaginatorNavLink;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import clsx from 'clsx';
|
|
10
|
-
import Link from '@docusaurus/Link';
|
|
11
|
-
import Translate from '@docusaurus/Translate';
|
|
12
|
-
import type {Props} from '@theme/DocPaginatorNavLink';
|
|
13
|
-
|
|
14
|
-
function DocPaginatorNavLink(props: Props): JSX.Element {
|
|
15
|
-
const {navLink, next} = props;
|
|
16
|
-
return (
|
|
17
|
-
<Link className={clsx('pagination-nav__link')} to={navLink.permalink}>
|
|
18
|
-
<div className="pagination-nav__sublabel">
|
|
19
|
-
{next ? (
|
|
20
|
-
<Translate
|
|
21
|
-
id="theme.docs.paginator.next"
|
|
22
|
-
description="The label used to navigate to the next doc">
|
|
23
|
-
Next
|
|
24
|
-
</Translate>
|
|
25
|
-
) : (
|
|
26
|
-
<Translate
|
|
27
|
-
id="theme.docs.paginator.previous"
|
|
28
|
-
description="The label used to navigate to the previous doc">
|
|
29
|
-
Previous
|
|
30
|
-
</Translate>
|
|
31
|
-
)}
|
|
32
|
-
</div>
|
|
33
|
-
<div className="pagination-nav__label">{navLink.title}</div>
|
|
34
|
-
</Link>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export default DocPaginatorNavLink;
|