dyomedea/src/components/back-forward/BackForward.tsx

31 lines
775 B
TypeScript
Raw Normal View History

2022-11-26 11:33:26 +00:00
import { Component, createEffect, createSignal } from 'solid-js';
import { IconButton } from '@suid/material';
import ArrowBackIcon from '@suid/icons-material/ArrowBack';
import ArrowForwardIcon from '@suid/icons-material/ArrowForward';
import styles from './BackForward.module.css';
export const Back: Component = () => {
const onClickHandler = (event: any) => {
window.history.back();
};
return (
<IconButton onClick={onClickHandler} class={styles.back}>
<ArrowBackIcon />
</IconButton>
);
};
export const Forward: Component = () => {
const onClickHandler = (event: any) => {
window.history.forward();
};
return (
<IconButton onClick={onClickHandler} class={styles.forward}>
<ArrowForwardIcon />
</IconButton>
);
};