Make the button components use the click listen instead of the handler

This commit is contained in:
Oliver-Akins 2021-12-24 03:19:33 -07:00
parent 4bdbe8f231
commit 7b4826dfbc
3 changed files with 6 additions and 6 deletions

View file

@ -19,7 +19,7 @@ let canLeave = $myName == $hostName || name == $myName;
{#if $myName == name} {#if $myName == name}
<SciFiButton <SciFiButton
background="{colour}" background="{colour}"
handler={changeColour} on:click={changeColour}
height="60px" height="60px"
width="60px" width="60px"
hoverBackground="{colour}" hoverBackground="{colour}"
@ -51,7 +51,7 @@ let canLeave = $myName == $hostName || name == $myName;
{#if canLeave} {#if canLeave}
<SciFiButton <SciFiButton
background="#ff0000" background="#ff0000"
handler={exitPlayer} on:click={exitPlayer}
height="60px" height="60px"
width="75px" width="75px"
hoverBackground="#ff0000" hoverBackground="#ff0000"

View file

@ -28,7 +28,7 @@ function closeModal() {
> >
<SciFiButton <SciFiButton
classes="close-button" classes="close-button"
handler={closeModal} on:click={closeModal}
height="60" height="60"
width="60" width="60"
on:click on:click

View file

@ -92,7 +92,7 @@ function toggleOptionsModal() {
<div class="sci-fi-box"> <div class="sci-fi-box">
<div class="info-button-container"> <div class="info-button-container">
<SciFiButton <SciFiButton
handler={toggleOptionsModal} on:click={_ => modal.options = true}
height="60px" height="60px"
width="60px" width="60px"
> >
@ -119,14 +119,14 @@ function toggleOptionsModal() {
<div class="flex-row"> <div class="flex-row">
<SciFiButton <SciFiButton
title="Starts the game" title="Starts the game"
handler={tempButtonHandler} on:click={tempButtonHandler}
> >
Start Game Start Game
</SciFiButton> </SciFiButton>
<SciFiButton <SciFiButton
title="Delete the lobby, preventing further games from being played" title="Delete the lobby, preventing further games from being played"
background="#ff0000" background="#ff0000"
handler={tempButtonHandler} on:click={tempButtonHandler}
> >
Delete Game Delete Game
</SciFiButton> </SciFiButton>