mirror of
https://github.com/jcreek/EstimationPoker.git
synced 2026-07-13 02:53:46 +00:00
feat(*): Update styling of users list component
This commit is contained in:
@@ -1,22 +1,57 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
export let estimates: any;
|
export let users: any;
|
||||||
export let handleEstimateChange: any;
|
export let showEstimates: boolean = false;
|
||||||
export let currentUserIndex: number;
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="users-list">
|
<div id="users-list">
|
||||||
<h2>Users</h2>
|
<h2>Users</h2>
|
||||||
<ul>
|
{#each users as user}
|
||||||
{#each estimates as user, index}
|
<div class="name">{user.name}</div>
|
||||||
<li>
|
<div
|
||||||
{user.name}
|
class="user-card"
|
||||||
<input
|
class:user-card-null={user.estimate === null}
|
||||||
type="number"
|
class:user-card-green={user.estimate !== null}
|
||||||
value={user.estimate}
|
>
|
||||||
on:input={(e) => handleEstimateChange(e, user)}
|
{#if user.estimate !== null && showEstimates}
|
||||||
disabled={currentUserIndex !== index ? true : null}
|
<p class="estimate">{user.estimate}</p>
|
||||||
/>
|
{/if}
|
||||||
</li>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.user-card {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 60px;
|
||||||
|
height: 80px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 8px;
|
||||||
|
margin: 10px;
|
||||||
|
background-color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-card-null {
|
||||||
|
background-color: #ccc;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-card-green {
|
||||||
|
background-color: #6bbf6b;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.estimate {
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.name {
|
||||||
|
font-size: 16px;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user