mirror of
https://github.com/danbulant/slightlyComplicatedTicTacToe
synced 2026-07-05 11:10:57 +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';
|
import { DEFAULT_TRANSITION_DURATION } from './config';
|
||||||
|
|
||||||
export let href: string | undefined = undefined;
|
export let href: string | undefined = undefined;
|
||||||
export let onclick: svelte.JSX.MouseEventHandler<HTMLAnchorElement> | undefined = undefined;
|
|
||||||
|
|
||||||
const duration = DEFAULT_TRANSITION_DURATION;
|
const duration = DEFAULT_TRANSITION_DURATION;
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -11,7 +10,7 @@
|
||||||
<a
|
<a
|
||||||
transition:fly={{ duration, delay: duration * 0.5, x: -60, opacity: 0 }}
|
transition:fly={{ duration, delay: duration * 0.5, x: -60, opacity: 0 }}
|
||||||
{href}
|
{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"
|
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">
|
<svg width="16" height="16">
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,7 @@
|
||||||
|
|
||||||
<svelte:window bind:innerWidth bind:innerHeight on:click={() => hoveredPiece = null} />
|
<svelte:window bind:innerWidth bind:innerHeight on:click={() => hoveredPiece = null} />
|
||||||
|
|
||||||
<BackButton href="/" onclick={check}/>
|
<BackButton href="/" on:click={check}/>
|
||||||
|
|
||||||
{#if !twoPlayer}
|
{#if !twoPlayer}
|
||||||
<!-- I have no idea why x is inverted here -->
|
<!-- I have no idea why x is inverted here -->
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue