Fix click when disabled

This commit is contained in:
Lucas Mello 2021-06-27 16:56:17 -03:00
commit 8bf6a1b0b3
2 changed files with 2 additions and 2 deletions

View file

@ -1,5 +1,5 @@
<template>
<g :class="['button', { enabled }]" @click="$emit('click')">
<g :class="['button', { enabled }]" @click="enabled && $emit('click')">
<rect width="80" height="26" fill="gainsboro" stroke="black" rx="2" />
<image x="15" y="8" width="10" height="10" href="../../icons/pass.svg" />
<text text-anchor="middle" fill="black" x="47" y="13">Pass</text>

View file

@ -1,5 +1,5 @@
<template>
<g :class="['button', { enabled }]" @click="$emit('click')">
<g :class="['button', { enabled }]" @click="enabled && $emit('click')">
<rect width="80" height="26" fill="gainsboro" stroke="black" rx="2" />
<image x="11" y="4" width="16" height="16" href="../../icons/undo.svg" />
<text text-anchor="middle" fill="black" x="47" y="13">Undo</text>