@yakad/ui 1.2.2 → 1.2.4
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/clientside.tsx
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
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;
|
package/package.json
CHANGED
|
@@ -16,7 +16,6 @@ import Row from "./row/row";
|
|
|
16
16
|
import Spacer from "./spacer/spacer";
|
|
17
17
|
import Stack from "./stack/stack";
|
|
18
18
|
import SvgIcon from "./svgIcon/svgIcon";
|
|
19
|
-
import ClickAwayListener from "./clickAwayListener/clickAwayListener";
|
|
20
19
|
|
|
21
20
|
export {
|
|
22
21
|
Button,
|
|
@@ -37,5 +36,4 @@ export {
|
|
|
37
36
|
Stack,
|
|
38
37
|
Spacer,
|
|
39
38
|
SvgIcon,
|
|
40
|
-
ClickAwayListener,
|
|
41
39
|
};
|