@yakad/ui 1.2.2 → 1.2.3
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/historyBack/historyBack.tsx +20 -0
- package/package.json +1 -1
- package/index.tsx +0 -41
|
@@ -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
package/index.tsx
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import Button from "./button/button";
|
|
2
|
-
import AppBar from "./appBar/appBar";
|
|
3
|
-
import Card from "./card/card";
|
|
4
|
-
import Container from "./container/container";
|
|
5
|
-
import Footer from "./footer/footer";
|
|
6
|
-
import Form from "./form/form";
|
|
7
|
-
import GridContainer from "./gridContainer/gridContainer";
|
|
8
|
-
import GridItem from "./gridItem/gridItem";
|
|
9
|
-
import Hr from "./hr/hr";
|
|
10
|
-
import List from "./list/list";
|
|
11
|
-
import ListItem from "./listItem/listItem";
|
|
12
|
-
import Main from "./main/main";
|
|
13
|
-
import Navigation from "./navigation/navigation";
|
|
14
|
-
import Page from "./page/page";
|
|
15
|
-
import Row from "./row/row";
|
|
16
|
-
import Spacer from "./spacer/spacer";
|
|
17
|
-
import Stack from "./stack/stack";
|
|
18
|
-
import SvgIcon from "./svgIcon/svgIcon";
|
|
19
|
-
import ClickAwayListener from "./clickAwayListener/clickAwayListener";
|
|
20
|
-
|
|
21
|
-
export {
|
|
22
|
-
Button,
|
|
23
|
-
AppBar,
|
|
24
|
-
Card,
|
|
25
|
-
Container,
|
|
26
|
-
Footer,
|
|
27
|
-
Form,
|
|
28
|
-
GridContainer,
|
|
29
|
-
GridItem,
|
|
30
|
-
Hr,
|
|
31
|
-
List,
|
|
32
|
-
ListItem,
|
|
33
|
-
Main,
|
|
34
|
-
Navigation,
|
|
35
|
-
Page,
|
|
36
|
-
Row,
|
|
37
|
-
Stack,
|
|
38
|
-
Spacer,
|
|
39
|
-
SvgIcon,
|
|
40
|
-
ClickAwayListener,
|
|
41
|
-
};
|