mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-13 20:56:11 +01:00
back button
This commit is contained in:
1 parent
1f1c9f26f1
commit
ba1f530de7
5 files changed
+50
-5
No files matched your search
@@ -0,0 +1,3 @@
|
||||
.back {
|
||||
display: contents;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import type { ComponentProps } from "react";
|
||||
import { classNames } from "../../ui/classNames";
|
||||
import styles from "./index.module.css";
|
||||
|
||||
interface Props extends ComponentProps<"div"> {}
|
||||
|
||||
export function Back({ className, onClick, ...props }: Props) {
|
||||
console.log("init");
|
||||
|
||||
return (
|
||||
<div
|
||||
className={classNames(styles.back, className)}
|
||||
onClick={(event) => {
|
||||
console.log("back");
|
||||
window.history.back();
|
||||
onClick?.(event);
|
||||
}}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user