shinkansen-gears 1.1.444 → 1.2.0
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/babel.config.cjs +1 -0
- package/eslint.config.mjs +221 -0
- package/index.d.mts +28 -0
- package/package.json +34 -28
- package/src/gears/forward/index.cjs +1 -1
- package/src/gears/forward/index.d.mts +3 -3
- package/src/gears/forward/index.jsx +3 -3
- package/src/gears/index.cjs +1 -1
- package/src/gears/index.d.mts +7 -12
- package/src/gears/index.jsx +10 -10
- package/src/gears/reverse/index.cjs +1 -1
- package/src/gears/reverse/index.d.mts +3 -3
- package/src/gears/reverse/index.jsx +3 -3
- package/src/index.d.mts +1 -7
package/babel.config.cjs
CHANGED
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import globals from 'globals'
|
|
2
|
+
// @ts-ignore
|
|
3
|
+
import standard from '@sequencemedia/eslint-config-standard/configs/recommended/merge'
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
import typescript from '@sequencemedia/eslint-config-typescript/configs/recommended/merge'
|
|
6
|
+
import babelParser from '@babel/eslint-parser'
|
|
7
|
+
import typescriptParser from '@typescript-eslint/parser'
|
|
8
|
+
import reactPlugin from 'eslint-plugin-react'
|
|
9
|
+
import storybookPlugin from 'eslint-plugin-storybook'
|
|
10
|
+
|
|
11
|
+
const reactParserOptions = {
|
|
12
|
+
ecmaFeatures: {
|
|
13
|
+
jsx: true
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const reactPlugins = {
|
|
18
|
+
react: reactPlugin
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const storybookPlugins = {
|
|
22
|
+
storybook: storybookPlugin
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const reactRules = {
|
|
26
|
+
'no-unused-vars': [
|
|
27
|
+
'error',
|
|
28
|
+
{
|
|
29
|
+
varsIgnorePattern: 'React'
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
quotes: [
|
|
33
|
+
'error',
|
|
34
|
+
'single'
|
|
35
|
+
],
|
|
36
|
+
'jsx-quotes': [
|
|
37
|
+
'error',
|
|
38
|
+
'prefer-single'
|
|
39
|
+
],
|
|
40
|
+
'react/jsx-indent': [
|
|
41
|
+
'error',
|
|
42
|
+
2,
|
|
43
|
+
{
|
|
44
|
+
checkAttributes: true,
|
|
45
|
+
indentLogicalExpressions: true
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const reactSettings = {
|
|
51
|
+
react: {
|
|
52
|
+
version: 'detect'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export default [
|
|
57
|
+
{
|
|
58
|
+
ignores: [
|
|
59
|
+
'coverage'
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
/**
|
|
63
|
+
* React config for all `jsx` files
|
|
64
|
+
*/
|
|
65
|
+
{
|
|
66
|
+
...reactPlugin.configs.flat.recommended,
|
|
67
|
+
settings: {
|
|
68
|
+
...reactSettings
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
/**
|
|
72
|
+
* Storybook config
|
|
73
|
+
*/
|
|
74
|
+
...storybookPlugin.configs['flat/recommended'],
|
|
75
|
+
/**
|
|
76
|
+
* Standard config
|
|
77
|
+
*/
|
|
78
|
+
standard({
|
|
79
|
+
files: [
|
|
80
|
+
'**/*.{mjs,cjs,mts,cts}'
|
|
81
|
+
],
|
|
82
|
+
ignores: [
|
|
83
|
+
'src',
|
|
84
|
+
'stories',
|
|
85
|
+
'test'
|
|
86
|
+
],
|
|
87
|
+
languageOptions: {
|
|
88
|
+
globals: {
|
|
89
|
+
...globals.node
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}),
|
|
93
|
+
standard({
|
|
94
|
+
files: [
|
|
95
|
+
'src/**/*.{mjs,cjs,mts,cts}',
|
|
96
|
+
'stories/**/*.{mjs,cjs,mts,cts}'
|
|
97
|
+
],
|
|
98
|
+
languageOptions: {
|
|
99
|
+
globals: {
|
|
100
|
+
...globals.browser
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}),
|
|
104
|
+
standard({
|
|
105
|
+
files: [
|
|
106
|
+
'test/**/*.{mjs,cjs,mts,cts}'
|
|
107
|
+
],
|
|
108
|
+
languageOptions: {
|
|
109
|
+
globals: {
|
|
110
|
+
...globals.mocha
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}),
|
|
114
|
+
/**
|
|
115
|
+
* Standard config for all `jsx` files
|
|
116
|
+
*/
|
|
117
|
+
standard({
|
|
118
|
+
files: [
|
|
119
|
+
'src/**/*.jsx',
|
|
120
|
+
'stories/**/*.jsx'
|
|
121
|
+
],
|
|
122
|
+
ignores: [
|
|
123
|
+
'src/**/__tests__/**/*.jsx',
|
|
124
|
+
'stories/**/__tests__/**/*.jsx'
|
|
125
|
+
],
|
|
126
|
+
languageOptions: {
|
|
127
|
+
parser: babelParser,
|
|
128
|
+
parserOptions: {
|
|
129
|
+
...reactParserOptions,
|
|
130
|
+
project: null
|
|
131
|
+
},
|
|
132
|
+
globals: {
|
|
133
|
+
...globals.browser
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
plugins: {
|
|
137
|
+
...reactPlugins,
|
|
138
|
+
...storybookPlugins
|
|
139
|
+
},
|
|
140
|
+
rules: {
|
|
141
|
+
...reactRules
|
|
142
|
+
},
|
|
143
|
+
settings: {
|
|
144
|
+
...reactSettings,
|
|
145
|
+
'import/resolver': {
|
|
146
|
+
'babel-module': {}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}),
|
|
150
|
+
standard({
|
|
151
|
+
files: [
|
|
152
|
+
'src/**/__tests__/**/*.jsx',
|
|
153
|
+
'stories/**/__tests__/**/*.jsx'
|
|
154
|
+
],
|
|
155
|
+
languageOptions: {
|
|
156
|
+
parser: babelParser,
|
|
157
|
+
parserOptions: {
|
|
158
|
+
...reactParserOptions,
|
|
159
|
+
project: null
|
|
160
|
+
},
|
|
161
|
+
globals: {
|
|
162
|
+
...globals.browser,
|
|
163
|
+
...globals.jest
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
plugins: {
|
|
167
|
+
...reactPlugins,
|
|
168
|
+
...storybookPlugins
|
|
169
|
+
},
|
|
170
|
+
rules: {
|
|
171
|
+
...reactRules
|
|
172
|
+
},
|
|
173
|
+
settings: {
|
|
174
|
+
...reactSettings,
|
|
175
|
+
'import/resolver': {
|
|
176
|
+
'babel-module': {}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}),
|
|
180
|
+
/**
|
|
181
|
+
* TypeScript config
|
|
182
|
+
*/
|
|
183
|
+
typescript({
|
|
184
|
+
files: [
|
|
185
|
+
'**/*.{mts,cts}'
|
|
186
|
+
],
|
|
187
|
+
ignores: [
|
|
188
|
+
'src',
|
|
189
|
+
'stories',
|
|
190
|
+
'test'
|
|
191
|
+
],
|
|
192
|
+
languageOptions: {
|
|
193
|
+
parser: typescriptParser,
|
|
194
|
+
parserOptions: {
|
|
195
|
+
projectService: true,
|
|
196
|
+
project: 'tsconfig.json'
|
|
197
|
+
},
|
|
198
|
+
globals: {
|
|
199
|
+
...globals.node,
|
|
200
|
+
GearsTypes: 'readonly'
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}),
|
|
204
|
+
typescript({
|
|
205
|
+
files: [
|
|
206
|
+
'src/**/*.{mts,cts}',
|
|
207
|
+
'test/**/*.{mts,cts}'
|
|
208
|
+
],
|
|
209
|
+
languageOptions: {
|
|
210
|
+
parser: typescriptParser,
|
|
211
|
+
parserOptions: {
|
|
212
|
+
projectService: true,
|
|
213
|
+
project: 'tsconfig.json'
|
|
214
|
+
},
|
|
215
|
+
globals: {
|
|
216
|
+
...globals.browser,
|
|
217
|
+
GearsTypes: 'readonly'
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
})
|
|
221
|
+
]
|
package/index.d.mts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace GearsTypes {
|
|
3
|
+
export interface GearsProps {
|
|
4
|
+
reverse?: Record<string, unknown> | object
|
|
5
|
+
forward?: Record<string, unknown> | object
|
|
6
|
+
pattern?: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface GearsState {
|
|
10
|
+
reverse?: Record<string, unknown> | object
|
|
11
|
+
forward?: Record<string, unknown> | object
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export namespace Reverse {
|
|
15
|
+
export interface ReverseProps {
|
|
16
|
+
pathname: string
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export namespace Forward {
|
|
21
|
+
export interface ForwardProps {
|
|
22
|
+
pathname: string
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shinkansen-gears",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Shinkansen Gears",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Shinkansen",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
],
|
|
14
14
|
"main": "./src/index.cjs",
|
|
15
15
|
"type": "module",
|
|
16
|
-
"types": "./
|
|
16
|
+
"types": "./index.d.mts",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "Jonathan Perry for Modern Poacher Limited",
|
|
19
19
|
"email": "modernpoacher@modernpoacher.com",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"build": "cross-env DEBUG=shinkansen-gears* webpack",
|
|
32
32
|
"build-storybook": "storybook build",
|
|
33
33
|
"build:watch": "cross-env DEBUG=shinkansen-gears* webpack --watch",
|
|
34
|
-
"lint": "eslint
|
|
34
|
+
"lint": "eslint",
|
|
35
35
|
"lint:fix": "npm run lint -- --fix",
|
|
36
36
|
"nvm": "bash nvm.sh",
|
|
37
37
|
"prelint": "npm run nvm",
|
|
@@ -44,55 +44,61 @@
|
|
|
44
44
|
"transform": "cross-env DEBUG=shinkansen-gears* ./transform.sh"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"debug": "^4.
|
|
47
|
+
"debug": "^4.4.0",
|
|
48
48
|
"fast-deep-equal": "^3.1.3"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@babel/core": "^7.26.
|
|
52
|
-
"@babel/eslint-parser": "^7.
|
|
53
|
-
"@babel/preset-env": "^7.26.
|
|
54
|
-
"@babel/preset-react": "^7.
|
|
51
|
+
"@babel/core": "^7.26.9",
|
|
52
|
+
"@babel/eslint-parser": "^7.26.8",
|
|
53
|
+
"@babel/preset-env": "^7.26.9",
|
|
54
|
+
"@babel/preset-react": "^7.26.3",
|
|
55
55
|
"@babel/register": "^7.25.9",
|
|
56
|
-
"@modernpoacher/design-system": "1.1.
|
|
56
|
+
"@modernpoacher/design-system": "1.1.27",
|
|
57
|
+
"@sequencemedia/eslint-config-standard": "^0.2.26",
|
|
58
|
+
"@sequencemedia/eslint-config-typescript": "^0.1.37",
|
|
57
59
|
"@storybook/addon-actions": "7.6.20",
|
|
58
60
|
"@storybook/addon-essentials": "7.6.20",
|
|
59
61
|
"@storybook/addon-links": "7.6.20",
|
|
60
62
|
"@storybook/react": "7.6.20",
|
|
61
63
|
"@storybook/react-webpack5": "7.6.20",
|
|
62
|
-
"@types/
|
|
63
|
-
"@
|
|
64
|
-
"@
|
|
64
|
+
"@types/babel__register": "^7.17.3",
|
|
65
|
+
"@types/debug": "^4.1.12",
|
|
66
|
+
"@types/jest": "^29.5.14",
|
|
67
|
+
"@types/react": "18.3.13",
|
|
68
|
+
"@types/react-test-renderer": "^19.0.0",
|
|
69
|
+
"@typescript-eslint/eslint-plugin": "^8.24.1",
|
|
70
|
+
"@typescript-eslint/parser": "^8.24.1",
|
|
65
71
|
"autoprefixer": "^10.4.20",
|
|
66
72
|
"clean-webpack-plugin": "^4.0.0",
|
|
67
|
-
"core-js": "^3.
|
|
73
|
+
"core-js": "^3.40.0",
|
|
68
74
|
"cross-env": "^7.0.3",
|
|
69
|
-
"eslint": "
|
|
70
|
-
"eslint-
|
|
71
|
-
"eslint-
|
|
72
|
-
"eslint-plugin-
|
|
75
|
+
"eslint": "^9.20.1",
|
|
76
|
+
"eslint-import-resolver-babel-module": "^5.3.2",
|
|
77
|
+
"eslint-plugin-react": "^7.37.4",
|
|
78
|
+
"eslint-plugin-storybook": "^0.11.3",
|
|
79
|
+
"globals": "^15.15.0",
|
|
73
80
|
"husky": "^9.1.7",
|
|
74
81
|
"jest": "^29.7.0",
|
|
75
82
|
"mini-css-extract-plugin": "^2.9.2",
|
|
76
83
|
"perfectionist": "^2.4.0",
|
|
77
|
-
"postcss": "^8.
|
|
84
|
+
"postcss": "^8.5.3",
|
|
78
85
|
"postcss-discard-comments": "^7.0.3",
|
|
79
86
|
"postcss-discard-empty": "^7.0.0",
|
|
80
87
|
"postcss-import": "^16.1.0",
|
|
81
88
|
"postcss-loader": "^8.1.1",
|
|
82
89
|
"postcss-map": "^0.11.0",
|
|
83
90
|
"prop-types": "^15.8.1",
|
|
84
|
-
"react": "
|
|
85
|
-
"react-dom": "
|
|
86
|
-
"react-router": "^7.0
|
|
87
|
-
"react-
|
|
88
|
-
"react-test-renderer": "^18.3.1",
|
|
91
|
+
"react": "18.3.1",
|
|
92
|
+
"react-dom": "18.3.1",
|
|
93
|
+
"react-router": "^7.2.0",
|
|
94
|
+
"react-test-renderer": "18.3.1",
|
|
89
95
|
"remove-files-webpack-plugin": "^1.5.0",
|
|
90
|
-
"sass": "^1.
|
|
91
|
-
"sass-loader": "^16.0.
|
|
92
|
-
"shinkansen-rails": "1.0.
|
|
96
|
+
"sass": "^1.85.0",
|
|
97
|
+
"sass-loader": "^16.0.5",
|
|
98
|
+
"shinkansen-rails": "1.0.282",
|
|
93
99
|
"storybook": "7.6.20",
|
|
94
|
-
"webpack": "^5.
|
|
95
|
-
"webpack-cli": "^
|
|
100
|
+
"webpack": "^5.98.0",
|
|
101
|
+
"webpack-cli": "^6.0.1"
|
|
96
102
|
},
|
|
97
103
|
"peerDependencies": {
|
|
98
104
|
"shinkansen-rails": "1.0.x"
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
declare module '#gears/gears/forward' {
|
|
2
2
|
import type React from 'react'
|
|
3
3
|
|
|
4
|
-
export
|
|
5
|
-
pathname: string
|
|
6
|
-
}
|
|
4
|
+
export type ForwardProps = GearsTypes.Forward.ForwardProps
|
|
7
5
|
|
|
8
6
|
export default function Forward (props: ForwardProps): React.JSX.Element
|
|
9
7
|
}
|
|
10
8
|
|
|
11
9
|
declare module 'shinkansen-gears/gears/forward' {
|
|
10
|
+
export type ForwardProps = GearsTypes.Forward.ForwardProps
|
|
11
|
+
|
|
12
12
|
export { default } from '#gears/gears/forward'
|
|
13
13
|
export * from '#gears/gears/forward'
|
|
14
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @typedef {
|
|
2
|
+
* @typedef {GearsTypes.Forward.ForwardProps} ForwardProps
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import React from 'react'
|
|
@@ -7,10 +7,10 @@ import PropTypes from 'prop-types'
|
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
Link
|
|
10
|
-
} from 'react-router
|
|
10
|
+
} from 'react-router'
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* @param {ForwardProps}
|
|
13
|
+
* @param {ForwardProps} props
|
|
14
14
|
* @returns {React.JSX.Element}
|
|
15
15
|
*/
|
|
16
16
|
function Forward ({ pathname }) {
|
package/src/gears/index.cjs
CHANGED
package/src/gears/index.d.mts
CHANGED
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
declare module '#gears/gears' {
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
forward: Record<string, unknown>
|
|
7
|
-
pattern: string
|
|
8
|
-
}
|
|
4
|
+
type GearsProps = GearsTypes.GearsProps
|
|
5
|
+
type GearsState = GearsTypes.GearsState
|
|
9
6
|
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
forward?: Record<string, unknown>
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function renderReverse (reverse: Record<string, unknown>, pattern?: string): React.JSX.Element | null
|
|
16
|
-
export function renderForward (forward: Record<string, unknown>, pattern?: string): React.JSX.Element | null
|
|
7
|
+
export function renderReverse (reverse?: Record<string, unknown>, pattern?: string): React.JSX.Element | null
|
|
8
|
+
export function renderForward (forward?: Record<string, unknown>, pattern?: string): React.JSX.Element | null
|
|
17
9
|
export default class Gears extends React.Component<GearsProps, GearsState> {}
|
|
18
10
|
}
|
|
19
11
|
|
|
20
12
|
declare module 'shinkansen-gears/gears' {
|
|
13
|
+
export type GearsProps = GearsTypes.GearsProps
|
|
14
|
+
export type GearsState = GearsTypes.GearsState
|
|
15
|
+
|
|
21
16
|
export { default } from '#gears/gears'
|
|
22
17
|
export * from '#gears/gears'
|
|
23
18
|
}
|
package/src/gears/index.jsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @typedef {
|
|
3
|
-
* @typedef {
|
|
2
|
+
* @typedef {GearsTypes.GearsProps} GearsProps
|
|
3
|
+
* @typedef {GearsTypes.GearsState} GearsState
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React, { Component } from 'react'
|
|
@@ -15,7 +15,7 @@ import Reverse from './reverse/index.jsx'
|
|
|
15
15
|
import Forward from './forward/index.jsx'
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* @type {(reverse
|
|
18
|
+
* @type {(reverse?: Record<string, unknown>, pattern?: string) => React.JSX.Element | null}
|
|
19
19
|
*/
|
|
20
20
|
export function renderReverse (reverse, pattern) {
|
|
21
21
|
if (Rails.go(reverse, pattern)) {
|
|
@@ -32,7 +32,7 @@ export function renderReverse (reverse, pattern) {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* @type {(forward
|
|
35
|
+
* @type {(forward?: Record<string, unknown>, pattern?: string) => React.JSX.Element | null}
|
|
36
36
|
*/
|
|
37
37
|
export function renderForward (forward, pattern) {
|
|
38
38
|
if (Rails.go(forward, pattern)) {
|
|
@@ -71,7 +71,7 @@ export default class Gears extends Component {
|
|
|
71
71
|
/**
|
|
72
72
|
* Compare latest 'props' and 'state' for changes to 'pattern', 'reverse' or 'forward'
|
|
73
73
|
*
|
|
74
|
-
* @param {
|
|
74
|
+
* @param {GearsProps} props Latest props
|
|
75
75
|
* @param {GearsState} state Current state
|
|
76
76
|
* @returns {boolean}
|
|
77
77
|
*/
|
|
@@ -100,9 +100,9 @@ export default class Gears extends Component {
|
|
|
100
100
|
|
|
101
101
|
render () {
|
|
102
102
|
const {
|
|
103
|
-
reverse,
|
|
104
|
-
forward,
|
|
105
|
-
pattern
|
|
103
|
+
reverse = {},
|
|
104
|
+
forward = {},
|
|
105
|
+
pattern = Rails.pattern()
|
|
106
106
|
} = this.props
|
|
107
107
|
|
|
108
108
|
const reverseGear = renderReverse(reverse, pattern)
|
|
@@ -128,7 +128,7 @@ Gears.defaultProps = {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
Gears.propTypes = {
|
|
131
|
-
reverse: PropTypes.shape(),
|
|
132
|
-
forward: PropTypes.shape(),
|
|
131
|
+
reverse: PropTypes.shape({}),
|
|
132
|
+
forward: PropTypes.shape({}),
|
|
133
133
|
pattern: PropTypes.string
|
|
134
134
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
declare module '#gears/gears/reverse' {
|
|
2
2
|
import type React from 'react'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
pathname: string
|
|
6
|
-
}
|
|
4
|
+
type ReverseProps = GearsTypes.Reverse.ReverseProps
|
|
7
5
|
|
|
8
6
|
export default function Reverse (props: ReverseProps): React.JSX.Element
|
|
9
7
|
}
|
|
10
8
|
|
|
11
9
|
declare module 'shinkansen-gears/gears/reverse' {
|
|
10
|
+
export type ReverseProps = GearsTypes.Reverse.ReverseProps
|
|
11
|
+
|
|
12
12
|
export { default } from '#gears/gears/reverse'
|
|
13
13
|
export * from '#gears/gears/reverse'
|
|
14
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @typedef {
|
|
2
|
+
* @typedef {GearsTypes.Reverse.ReverseProps} ReverseProps
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import React from 'react'
|
|
@@ -7,10 +7,10 @@ import PropTypes from 'prop-types'
|
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
Link
|
|
10
|
-
} from 'react-router
|
|
10
|
+
} from 'react-router'
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* @param {ReverseProps}
|
|
13
|
+
* @param {ReverseProps} props
|
|
14
14
|
* @returns {React.JSX.Element}
|
|
15
15
|
*/
|
|
16
16
|
function Reverse ({ pathname }) {
|