mirror of
https://github.com/jcreek/EstimationPoker.git
synced 2026-07-12 18:43:47 +00:00
feat(*): Disable estimates when estimation closed
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
<script lang="ts">
|
||||
export let values: number[] = [1, 2, 3, 5, 8, 13, 21];
|
||||
export let onEstimateClick: (value: number) => void;
|
||||
export let disableEstimates: boolean = false;
|
||||
</script>
|
||||
|
||||
<div id="estimates-list">
|
||||
<div class="centered-container">
|
||||
{#each values as value}
|
||||
<button
|
||||
class="estimate-card"
|
||||
disabled={disableEstimates}
|
||||
class="{disableEstimates ? 'estimate-card disabled' : 'estimate-card'}"
|
||||
on:click={() => onEstimateClick(value)}
|
||||
on:keydown={(event) => {
|
||||
if (event.key === 'Enter' || event.key === ' ') {
|
||||
@@ -41,6 +43,10 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.disabled {
|
||||
background-color: grey;
|
||||
}
|
||||
|
||||
.value {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
|
||||
Reference in New Issue
Block a user