mirror of
https://github.com/danbulant/slightlyComplicatedTicTacToe
synced 2026-06-19 06:21:19 +00:00
use better events
This commit is contained in:
parent
91ea7c1a16
commit
63d67c403e
2 changed files with 2 additions and 3 deletions
|
|
@ -3,7 +3,6 @@
|
|||
import { DEFAULT_TRANSITION_DURATION } from './config';
|
||||
|
||||
export let href: string | undefined = undefined;
|
||||
export let onclick: svelte.JSX.MouseEventHandler<HTMLAnchorElement> | undefined = undefined;
|
||||
|
||||
const duration = DEFAULT_TRANSITION_DURATION;
|
||||
</script>
|
||||
|
|
@ -11,7 +10,7 @@
|
|||
<a
|
||||
transition:fly={{ duration, delay: duration * 0.5, x: -60, opacity: 0 }}
|
||||
{href}
|
||||
on:click={onclick}
|
||||
on:click
|
||||
class="text-black dark:text-white arrow-back fixed top-0 left-0 w-4 h-4 m-4 p-2 transform transition-transform hover:-translate-x-1"
|
||||
>
|
||||
<svg width="16" height="16">
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@
|
|||
|
||||
<svelte:window bind:innerWidth bind:innerHeight on:click={() => hoveredPiece = null} />
|
||||
|
||||
<BackButton href="/" onclick={check}/>
|
||||
<BackButton href="/" on:click={check}/>
|
||||
|
||||
{#if !twoPlayer}
|
||||
<!-- I have no idea why x is inverted here -->
|
||||
|
|
|
|||
Loading…
Reference in a new issue