mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-21 12:53:56 +01:00
19 lines
478 B
TypeScript
19 lines
478 B
TypeScript
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) {
|
||
|
|
return (
|
||
|
|
<div
|
||
|
|
className={classNames(styles.back, className)}
|
||
|
|
onClick={(event) => {
|
||
|
|
console.log("back");
|
||
|
|
window.history.back();
|
||
|
|
onClick?.(event);
|
||
|
|
}}
|
||
|
|
{...props}
|
||
|
|
/>
|
||
|
|
);
|
||
|
|
}
|