mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-09 17:05:01 +00:00
Added optional icon to sortable list (#2515)
Signed-off-by: Oleg Solodkov <oleg.solodkov@ezthera.com>
This commit is contained in:
parent
835a37c6f0
commit
1e14668439
@ -14,10 +14,10 @@
|
|||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Class, Doc, DocumentQuery, FindOptions, FindResult, Ref } from '@hcengineering/core'
|
import { Class, Doc, DocumentQuery, FindOptions, FindResult, Ref } from '@hcengineering/core'
|
||||||
import { getResource, IntlString } from '@hcengineering/platform'
|
import { Asset, getResource, IntlString } from '@hcengineering/platform'
|
||||||
import presentation, { createQuery, getClient } from '@hcengineering/presentation'
|
import presentation, { createQuery, getClient } from '@hcengineering/presentation'
|
||||||
import { calcRank, DocWithRank } from '@hcengineering/task'
|
import { calcRank, DocWithRank } from '@hcengineering/task'
|
||||||
import { Button, Component, IconAdd, Label, Loading } from '@hcengineering/ui'
|
import { Button, Component, Icon, IconAdd, IconSize, Label, Loading } from '@hcengineering/ui'
|
||||||
import view, { ObjectFactory } from '@hcengineering/view'
|
import view, { ObjectFactory } from '@hcengineering/view'
|
||||||
import { flip } from 'svelte/animate'
|
import { flip } from 'svelte/animate'
|
||||||
import { SvelteComponentDev } from 'svelte/internal'
|
import { SvelteComponentDev } from 'svelte/internal'
|
||||||
@ -46,6 +46,8 @@
|
|||||||
export let isAddButtonHidden = false
|
export let isAddButtonHidden = false
|
||||||
export let isAddButtonDisabled = false
|
export let isAddButtonDisabled = false
|
||||||
export let itemsCount = 0
|
export let itemsCount = 0
|
||||||
|
export let icon: Asset | undefined = undefined
|
||||||
|
export let iconSize: IconSize = 'small'
|
||||||
|
|
||||||
const client = getClient()
|
const client = getClient()
|
||||||
const hierarchy = client.getHierarchy()
|
const hierarchy = client.getHierarchy()
|
||||||
@ -157,6 +159,11 @@
|
|||||||
<div class="flex-col">
|
<div class="flex-col">
|
||||||
{#if label || !isAddButtonHidden}
|
{#if label || !isAddButtonHidden}
|
||||||
<div class="flex mb-4">
|
<div class="flex mb-4">
|
||||||
|
{#if icon}
|
||||||
|
<div class="mr-2 flex-center">
|
||||||
|
<Icon {icon} size={iconSize} />
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
{#if label}
|
{#if label}
|
||||||
<div class="title-wrapper">
|
<div class="title-wrapper">
|
||||||
<span class="wrapped-title text-base content-accent-color">
|
<span class="wrapped-title text-base content-accent-color">
|
||||||
|
Loading…
Reference in New Issue
Block a user