@yakad/ui 1.2.73-beta → 1.2.75-beta
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/appBar/appBar.module.css +1 -0
- package/button/button.d.ts +2 -3
- package/button/button.js +14 -11
- package/button/button.js.map +1 -1
- package/button/button.module.css +3 -0
- package/button/button.tsx +18 -16
- package/declarations.d.ts +1 -0
- package/index.d.ts +2 -1
- package/index.js +2 -1
- package/index.js.map +1 -1
- package/index.tsx +2 -0
- package/inputField/inputField.d.ts +1 -1
- package/inputField/inputField.js.map +1 -1
- package/inputField/inputField.tsx +13 -13
- package/package.json +1 -2
- package/client.d.ts +0 -3
- package/client.js +0 -4
- package/client.js.map +0 -1
- package/client.tsx +0 -4
- package/historyBack/historyBack.d.ts +0 -3
- package/historyBack/historyBack.js +0 -11
- package/historyBack/historyBack.js.map +0 -1
- package/historyBack/historyBack.tsx +0 -20
package/appBar/appBar.module.css
CHANGED
package/button/button.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
3
|
-
loading?: boolean;
|
|
4
3
|
size?: "small" | "medium" | "large";
|
|
5
4
|
variant?: "text" | "outlined" | "filled" | "filledtonal" | "tonal" | "elevated" | "link" | "fab";
|
|
6
|
-
borderStyle?: "none" | "semi" | "rounded";
|
|
5
|
+
borderStyle?: "none" | "semi" | "squircle" | "rounded";
|
|
7
6
|
icon?: JSX.Element;
|
|
8
7
|
iconPosition?: "start" | "end";
|
|
9
|
-
loadingPosition?: "
|
|
8
|
+
loadingPosition?: "auto" | "center";
|
|
10
9
|
loadingVariant?: "scaleOut" | "dots" | "spinner";
|
|
11
10
|
disabled?: boolean;
|
|
12
11
|
}
|
package/button/button.js
CHANGED
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { joinClassNames } from "@yakad/lib";
|
|
3
|
-
import styles from "./button.module.css";
|
|
4
3
|
import SvgIcon from "../svgIcon/svgIcon";
|
|
5
4
|
import Loading from "../loading/loading";
|
|
6
|
-
|
|
5
|
+
import styles from "./button.module.css";
|
|
6
|
+
const iconSizeMaps = {
|
|
7
7
|
small: 2,
|
|
8
8
|
medium: 2.4,
|
|
9
|
-
large: 3,
|
|
9
|
+
large: 3.2,
|
|
10
10
|
};
|
|
11
11
|
function Button(props) {
|
|
12
|
-
const
|
|
13
|
-
const centerLoading = !props.icon ||
|
|
14
|
-
|
|
12
|
+
const startWithChildren = props.iconPosition === "end";
|
|
13
|
+
const centerLoading = !props.icon ||
|
|
14
|
+
(props.loadingVariant && props.loadingPosition === "center");
|
|
15
|
+
const joinedClassNames = joinClassNames(styles.button, props.variant ? styles[props.variant] : styles.text, props.loadingVariant ? styles.loading : "", props.loadingVariant && centerLoading
|
|
16
|
+
? styles.loadingPositionCenter
|
|
17
|
+
: "", props.size ? styles[props.size] : styles.medium, props.borderStyle ? styles[props.borderStyle] : styles.rounded, props.icon && !props.children ? styles.iconButton : "", props.className);
|
|
15
18
|
return (React.createElement("button", { ...props, className: joinedClassNames },
|
|
16
|
-
|
|
17
|
-
props.
|
|
19
|
+
startWithChildren ? props.children : null,
|
|
20
|
+
props.loadingVariant ? (React.createElement("div", { className: joinClassNames(centerLoading ? styles.positionCenter : "", styles.displayOnDisabled) },
|
|
18
21
|
React.createElement(Loading, { size: props.size, variant: props.loadingVariant }))) : null,
|
|
19
22
|
props.icon ? (React.createElement(SvgIcon, { className: styles.hideOnDisabled, size: props.size
|
|
20
|
-
?
|
|
21
|
-
:
|
|
22
|
-
!
|
|
23
|
+
? iconSizeMaps[props.size]
|
|
24
|
+
: iconSizeMaps.medium }, props.icon)) : null,
|
|
25
|
+
!startWithChildren ? props.children : null));
|
|
23
26
|
}
|
|
24
27
|
export default Button;
|
|
25
28
|
//# sourceMappingURL=button.js.map
|
package/button/button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,OAAO,MAAM,oBAAoB,CAAC;AACzC,OAAO,OAAO,MAAM,oBAAoB,CAAC;AACzC,OAAO,MAAM,MAAM,qBAAqB,CAAC;AA2BzC,MAAM,YAAY,GAAgB;IAC9B,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,GAAG;IACX,KAAK,EAAE,GAAG;CACb,CAAC;AAEF,SAAS,MAAM,CAAC,KAAkB;IAC9B,MAAM,iBAAiB,GAAG,KAAK,CAAC,YAAY,KAAK,KAAK,CAAC;IACvD,MAAM,aAAa,GACf,CAAC,KAAK,CAAC,IAAI;QACX,CAAC,KAAK,CAAC,cAAc,IAAI,KAAK,CAAC,eAAe,KAAK,QAAQ,CAAC,CAAC;IAEjE,MAAM,gBAAgB,GAAG,cAAc,CACnC,MAAM,CAAC,MAAM,EACb,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EACnD,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAC1C,KAAK,CAAC,cAAc,IAAI,aAAa;QACjC,CAAC,CAAC,MAAM,CAAC,qBAAqB;QAC9B,CAAC,CAAC,EAAE,EACR,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,EAC/C,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,EAC9D,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EACtD,KAAK,CAAC,SAAU,CACnB,CAAC;IAEF,OAAO,CACH,mCAAY,KAAK,EAAE,SAAS,EAAE,gBAAgB;QACzC,iBAAiB,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI;QACzC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CACpB,6BACI,SAAS,EAAE,cAAc,CACrB,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,EAC1C,MAAM,CAAC,iBAAiB,CAC3B;YAED,oBAAC,OAAO,IAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,cAAc,GAAI,CAC1D,CACT,CAAC,CAAC,CAAC,IAAI;QACP,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CACV,oBAAC,OAAO,IACJ,SAAS,EAAE,MAAM,CAAC,cAAc,EAChC,IAAI,EACA,KAAK,CAAC,IAAI;gBACN,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC;gBAC1B,CAAC,CAAC,YAAY,CAAC,MAAM,IAG5B,KAAK,CAAC,IAAI,CACL,CACb,CAAC,CAAC,CAAC,IAAI;QACP,CAAC,iBAAiB,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CACtC,CACZ,CAAC;AACN,CAAC;AAED,eAAe,MAAM,CAAC"}
|
package/button/button.module.css
CHANGED
package/button/button.tsx
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { joinClassNames } from "@yakad/lib";
|
|
3
|
-
import styles from "./button.module.css";
|
|
4
3
|
import SvgIcon from "../svgIcon/svgIcon";
|
|
5
4
|
import Loading from "../loading/loading";
|
|
5
|
+
import styles from "./button.module.css";
|
|
6
6
|
|
|
7
7
|
interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
8
|
-
loading?: boolean;
|
|
9
8
|
size?: "small" | "medium" | "large";
|
|
10
9
|
variant?:
|
|
11
10
|
| "text"
|
|
@@ -16,36 +15,39 @@ interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
|
16
15
|
| "elevated"
|
|
17
16
|
| "link"
|
|
18
17
|
| "fab";
|
|
19
|
-
borderStyle?: "none" | "semi" | "rounded";
|
|
18
|
+
borderStyle?: "none" | "semi" | "squircle" | "rounded";
|
|
20
19
|
icon?: JSX.Element;
|
|
21
20
|
iconPosition?: "start" | "end";
|
|
22
|
-
loadingPosition?: "
|
|
21
|
+
loadingPosition?: "auto" | "center";
|
|
23
22
|
loadingVariant?: "scaleOut" | "dots" | "spinner";
|
|
24
23
|
disabled?: boolean;
|
|
25
24
|
}
|
|
26
25
|
|
|
27
|
-
interface
|
|
26
|
+
interface iconSizeMap {
|
|
28
27
|
small: number;
|
|
29
28
|
medium: number;
|
|
30
29
|
large: number;
|
|
31
30
|
}
|
|
32
31
|
|
|
33
|
-
const
|
|
32
|
+
const iconSizeMaps: iconSizeMap = {
|
|
34
33
|
small: 2,
|
|
35
34
|
medium: 2.4,
|
|
36
|
-
large: 3,
|
|
35
|
+
large: 3.2,
|
|
37
36
|
};
|
|
38
37
|
|
|
39
38
|
function Button(props: ButtonProps) {
|
|
40
|
-
const
|
|
39
|
+
const startWithChildren = props.iconPosition === "end";
|
|
41
40
|
const centerLoading =
|
|
42
|
-
!props.icon ||
|
|
41
|
+
!props.icon ||
|
|
42
|
+
(props.loadingVariant && props.loadingPosition === "center");
|
|
43
43
|
|
|
44
44
|
const joinedClassNames = joinClassNames(
|
|
45
45
|
styles.button,
|
|
46
|
-
props.loading ? styles.loading : "",
|
|
47
46
|
props.variant ? styles[props.variant] : styles.text,
|
|
48
|
-
props.
|
|
47
|
+
props.loadingVariant ? styles.loading : "",
|
|
48
|
+
props.loadingVariant && centerLoading
|
|
49
|
+
? styles.loadingPositionCenter
|
|
50
|
+
: "",
|
|
49
51
|
props.size ? styles[props.size] : styles.medium,
|
|
50
52
|
props.borderStyle ? styles[props.borderStyle] : styles.rounded,
|
|
51
53
|
props.icon && !props.children ? styles.iconButton : "",
|
|
@@ -54,8 +56,8 @@ function Button(props: ButtonProps) {
|
|
|
54
56
|
|
|
55
57
|
return (
|
|
56
58
|
<button {...props} className={joinedClassNames}>
|
|
57
|
-
{
|
|
58
|
-
{props.
|
|
59
|
+
{startWithChildren ? props.children : null}
|
|
60
|
+
{props.loadingVariant ? (
|
|
59
61
|
<div
|
|
60
62
|
className={joinClassNames(
|
|
61
63
|
centerLoading ? styles.positionCenter : "",
|
|
@@ -70,14 +72,14 @@ function Button(props: ButtonProps) {
|
|
|
70
72
|
className={styles.hideOnDisabled}
|
|
71
73
|
size={
|
|
72
74
|
props.size
|
|
73
|
-
?
|
|
74
|
-
:
|
|
75
|
+
? iconSizeMaps[props.size]
|
|
76
|
+
: iconSizeMaps.medium
|
|
75
77
|
}
|
|
76
78
|
>
|
|
77
79
|
{props.icon}
|
|
78
80
|
</SvgIcon>
|
|
79
81
|
) : null}
|
|
80
|
-
{!
|
|
82
|
+
{!startWithChildren ? props.children : null}
|
|
81
83
|
</button>
|
|
82
84
|
);
|
|
83
85
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module "*.module.css";
|
package/index.d.ts
CHANGED
|
@@ -20,4 +20,5 @@ import Loading from "./loading/loading";
|
|
|
20
20
|
import CodeField from "./codeField/codeField";
|
|
21
21
|
import InputField from "./inputField/inputField";
|
|
22
22
|
import Theme from "./theme/theme";
|
|
23
|
-
|
|
23
|
+
import ClickAwayListener from "./clickAwayListener/clickAwayListener";
|
|
24
|
+
export { Button, AppBar, Card, Container, Footer, Form, GridContainer, GridItem, Hr, List, ListItem, Main, Navigation, Page, Row, Stack, Spacer, SvgIcon, Loading, CodeField, InputField, Theme, ClickAwayListener, };
|
package/index.js
CHANGED
|
@@ -20,5 +20,6 @@ import Loading from "./loading/loading";
|
|
|
20
20
|
import CodeField from "./codeField/codeField";
|
|
21
21
|
import InputField from "./inputField/inputField";
|
|
22
22
|
import Theme from "./theme/theme";
|
|
23
|
-
|
|
23
|
+
import ClickAwayListener from "./clickAwayListener/clickAwayListener";
|
|
24
|
+
export { Button, AppBar, Card, Container, Footer, Form, GridContainer, GridItem, Hr, List, ListItem, Main, Navigation, Page, Row, Stack, Spacer, SvgIcon, Loading, CodeField, InputField, Theme, ClickAwayListener, };
|
|
24
25
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,aAAa,MAAM,+BAA+B,CAAC;AAC1D,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAC3C,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,GAAG,MAAM,WAAW,CAAC;AAC5B,OAAO,MAAM,MAAM,iBAAiB,CAAC;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mB,CAAC;AACxC,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,KAAK,MAAM,eAAe,CAAC;AAClC,OAAO,iBAAiB,MAAM,uCAAuC,CAAC;AACtE,OAAO,EACH,MAAM,EACN,MAAM,EACN,IAAI,EACJ,SAAS,EACT,MAAM,EACN,IAAI,EACJ,aAAa,EACb,QAAQ,EACR,EAAE,EACF,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,UAAU,EACV,IAAI,EACJ,GAAG,EACH,KAAK,EACL,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,UAAU,EACV,KAAK,EACL,iBAAiB,GACpB,CAAC"}
|
package/index.tsx
CHANGED
|
@@ -20,6 +20,7 @@ import Loading from "./loading/loading";
|
|
|
20
20
|
import CodeField from "./codeField/codeField";
|
|
21
21
|
import InputField from "./inputField/inputField";
|
|
22
22
|
import Theme from "./theme/theme";
|
|
23
|
+
import ClickAwayListener from "./clickAwayListener/clickAwayListener";
|
|
23
24
|
export {
|
|
24
25
|
Button,
|
|
25
26
|
AppBar,
|
|
@@ -43,4 +44,5 @@ export {
|
|
|
43
44
|
CodeField,
|
|
44
45
|
InputField,
|
|
45
46
|
Theme,
|
|
47
|
+
ClickAwayListener,
|
|
46
48
|
};
|
|
@@ -6,7 +6,7 @@ interface InputFieldProps extends React.HTMLAttributes<HTMLInputElement> {
|
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
name?: string;
|
|
8
8
|
value?: string;
|
|
9
|
-
required?:
|
|
9
|
+
required?: boolean;
|
|
10
10
|
}
|
|
11
11
|
declare function InputField(props: InputFieldProps): JSX.Element;
|
|
12
12
|
export default InputField;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputField.js","sourceRoot":"","sources":["inputField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,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MLAttributes<HTMLInputElement> {
|
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
name?: string;
|
|
11
11
|
value?: string;
|
|
12
|
-
required?:
|
|
12
|
+
required?: boolean;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
function InputField(props: InputFieldProps) {
|
|
@@ -20,18 +20,18 @@ function InputField(props: InputFieldProps) {
|
|
|
20
20
|
);
|
|
21
21
|
|
|
22
22
|
return (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
<label className={styles.label}>
|
|
24
|
+
<input
|
|
25
|
+
{...props}
|
|
26
|
+
name={props.name}
|
|
27
|
+
disabled={props.disabled}
|
|
28
|
+
placeholder=" "
|
|
29
|
+
type={props.type}
|
|
30
|
+
value={props.value}
|
|
31
|
+
className={joinedClassNames}
|
|
32
|
+
/>
|
|
33
|
+
<span className={styles.span}>{props.placeholder}</span>
|
|
34
|
+
</label>
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
37
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yakad/ui",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.75-beta",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
"@yakad/lib": "1.0.5",
|
|
24
24
|
"react": "18.2.0",
|
|
25
25
|
"react-dom": "18.2.0",
|
|
26
|
-
"react-router-dom": "6.4.2",
|
|
27
26
|
"typescript": "4.8.4"
|
|
28
27
|
},
|
|
29
28
|
"devDependencies": {
|
package/client.d.ts
DELETED
package/client.js
DELETED
package/client.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["client.tsx"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,uCAAuC,CAAC;AACtE,OAAO,WAAW,MAAM,2BAA2B,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,CAAC"}
|
package/client.tsx
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { useNavigate } from "react-router-dom";
|
|
3
|
-
function HistoryBack(props) {
|
|
4
|
-
const navigate = useNavigate();
|
|
5
|
-
return (React.createElement("div", { ...props, onClick: () => {
|
|
6
|
-
navigate(-1);
|
|
7
|
-
props.onClick(null);
|
|
8
|
-
} }, props.children));
|
|
9
|
-
}
|
|
10
|
-
export default HistoryBack;
|
|
11
|
-
//# sourceMappingURL=historyBack.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"historyBack.js","sourceRoot":"","sources":["historyBack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,SAAS,WAAW,CAAC,KAA2C;IAC5D,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,OAAO,CACH,gCACQ,KAAK,EACT,OAAO,EAAE,GAAG,EAAE;YACV,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;YACb,KAAK,CAAC,OAAQ,CAAC,IAAW,CAAC,CAAC;QAChC,CAAC,IAEA,KAAK,CAAC,QAAQ,CACb,CACT,CAAC;AACN,CAAC;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { useNavigate } from "react-router-dom";
|
|
3
|
-
|
|
4
|
-
function HistoryBack(props: React.HTMLAttributes<HTMLDivElement>) {
|
|
5
|
-
const navigate = useNavigate();
|
|
6
|
-
|
|
7
|
-
return (
|
|
8
|
-
<div
|
|
9
|
-
{...props}
|
|
10
|
-
onClick={() => {
|
|
11
|
-
navigate(-1);
|
|
12
|
-
props.onClick!(null as any);
|
|
13
|
-
}}
|
|
14
|
-
>
|
|
15
|
-
{props.children}
|
|
16
|
-
</div>
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export default HistoryBack;
|