Board: Add button shape and title props (#1381)

Signed-off-by: Anna No <anna.no@xored.com>
This commit is contained in:
Anna No
2022-04-13 00:13:28 +07:00
committed by GitHub
parent b3d6a11161
commit 1c321d2da5
3 changed files with 10 additions and 6 deletions
@@ -77,7 +77,7 @@
{#each members as member}
<MemberPresenter value={member} size="large" />
{/each}
<Button icon={IconAdd} isCircle={true} kind="no-border" size="large" on:click={membersHandler} />
<Button icon={IconAdd} shape="circle" kind="no-border" size="large" on:click={membersHandler} />
</div>
</div>
{/if}
@@ -1,5 +1,5 @@
<script lang="ts">
import type { Employee } from '@anticrm/contact'
import { Employee, formatName } from '@anticrm/contact'
import { getFirstName, getLastName } from '@anticrm/contact'
import { ContactPresenter } from '@anticrm/contact-resources'
import { Button, showPopup } from '@anticrm/ui'
@@ -9,13 +9,15 @@
const firstName = getFirstName(value.name)
const lastName = getLastName(value.name)
const nameLabel = `${firstName?.[0] ?? ''}${lastName?.[0] ?? ''}`.toUpperCase()
const formattedName = formatName(value.name)
</script>
{#if value}
<Button
{size}
kind="no-border"
isCircle={true}
shape="circle"
title={formattedName}
on:click={() => {
showPopup(ContactPresenter, { value }) // TODO: show proper popup
}}