mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-13 21:27:46 +02:00
A tooltip with a new approach (#2172)
Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
@@ -21,7 +21,6 @@
|
||||
Button,
|
||||
eventToHTMLElement,
|
||||
getFocusManager,
|
||||
Tooltip,
|
||||
TooltipAlignment
|
||||
} from '@anticrm/ui'
|
||||
import EnumPopup from './EnumPopup.svelte'
|
||||
@@ -63,10 +62,16 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<Tooltip {label} fill={false} direction={labelDirection}>
|
||||
<Button {focus} {focusIndex} icon={IconFolder} size={'small'} kind={'no-border'} on:click={handleClick}>
|
||||
<span slot="content" class="text-sm overflow-label disabled">
|
||||
{#if value}{value.name}{:else}<Label {label} />{/if}
|
||||
</span>
|
||||
</Button>
|
||||
</Tooltip>
|
||||
<Button
|
||||
{focus}
|
||||
{focusIndex}
|
||||
icon={IconFolder}
|
||||
size={'small'}
|
||||
kind={'no-border'}
|
||||
showTooltip={{ label, direction: labelDirection }}
|
||||
on:click={handleClick}
|
||||
>
|
||||
<span slot="content" class="text-sm overflow-label disabled">
|
||||
{#if value}{value.name}{:else}<Label {label} />{/if}
|
||||
</span>
|
||||
</Button>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
import core, { Enum, EnumOf, Ref } from '@anticrm/core'
|
||||
import { TypeEnum } from '@anticrm/model'
|
||||
import presentation, { getClient } from '@anticrm/presentation'
|
||||
import { Button, Tooltip, Label, showPopup } from '@anticrm/ui'
|
||||
import { Button, Label, showPopup } from '@anticrm/ui'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import setting from '../../plugin'
|
||||
import EnumSelect from './EnumSelect.svelte'
|
||||
@@ -60,9 +60,13 @@
|
||||
</div>
|
||||
{#if value}
|
||||
<div class="ml-2">
|
||||
<Tooltip label={presentation.string.Edit}>
|
||||
<Button icon={setting.icon.Setting} kind={'no-border'} on:click={edit} size={'small'} />
|
||||
</Tooltip>
|
||||
<Button
|
||||
icon={setting.icon.Setting}
|
||||
kind={'no-border'}
|
||||
size={'small'}
|
||||
showTooltip={{ label: presentation.string.Edit }}
|
||||
on:click={edit}
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user