Allow actionIcon has keys for tooltip

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2024-05-10 11:35:57 +05:00
parent 3e835e0c70
commit 515bbf5066
No known key found for this signature in database
GPG Key ID: 211936D31001B31C

View File

@ -13,12 +13,12 @@
// limitations under the License.
-->
<script lang="ts">
import type { IntlString, Asset } from '@hcengineering/platform'
import type { AnySvelteComponent, TooltipAlignment } from '../types'
import type { Asset, IntlString } from '@hcengineering/platform'
import { ComponentType } from 'svelte'
import type { AnySvelteComponent, TooltipAlignment } from '../types'
import Icon from './Icon.svelte'
import { tooltip } from '../tooltips'
import Icon from './Icon.svelte'
export let label: IntlString = '' as IntlString
export let labelProps: any = undefined
@ -29,11 +29,12 @@
export let action: (ev: MouseEvent) => Promise<void> | void = async () => {}
export let invisible: boolean = false
export let disabled: boolean = false
export let keys: string[] | undefined = undefined
</script>
<button
class="button {size}"
use:tooltip={{ label, direction, props: labelProps }}
use:tooltip={{ label, direction, props: labelProps, keys }}
tabindex="0"
on:click|stopPropagation|preventDefault={action}
on:contextmenu