Fix svelte-check in ui (#663)

Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Alexander Platov 2021-12-17 12:03:43 +03:00 committed by GitHub
parent 3be74a1751
commit 0b72615c3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 7 deletions

View File

@ -15,7 +15,7 @@
-->
<script lang="ts">
import type { AttachedDoc, Class, Doc, Ref } from '@anticrm/core'
import type { AttachedDoc, Doc } from '@anticrm/core'
import core from '@anticrm/core'
import { getResource } from '@anticrm/platform'
import type { AnySvelteComponent } from '@anticrm/ui'

View File

@ -18,10 +18,8 @@
import type { AnySvelteComponent } from '../types'
import Icon from './Icon.svelte'
import Tooltip from './Tooltip.svelte'
import ActionIcon from './ActionIcon.svelte'
import IconClose from './icons/Close.svelte'
import ui from '../plugin'
import Label from './Label.svelte'
export let icon: Asset | AnySvelteComponent
export let width: string | undefined = undefined

View File

@ -26,7 +26,6 @@
export let zIndex: number
let modalHTML: HTMLElement
let modalOHTML: HTMLElement
let componentInstance: any
let show: boolean = false
@ -97,7 +96,7 @@
<div class="popup" bind:this={modalHTML} style={`z-index: ${zIndex + 1};`}>
<svelte:component bind:this={componentInstance} this={is} {...props} on:update={fitPopup} on:close={ (ev) => close(ev.detail) } />
</div>
<div bind:this={modalOHTML} class="modal-overlay" class:show style={`z-index: ${zIndex};`} on:click={() => escapeClose()} />
<div class="modal-overlay" class:show style={`z-index: ${zIndex};`} on:click={() => escapeClose()} />
<style lang="scss">
.popup {

View File

@ -27,7 +27,6 @@
let tooltipSW: boolean // tooltipSW = true - Label; false - Component
let nubDirection: 'top' | 'bottom' | 'left' | 'right' | undefined = undefined
let clWidth: number
let clHeight: number
$: tooltipSW = $tooltip.component ? false : true
@ -149,7 +148,7 @@
<clipPath id="nub-border"><path d="M4.8 5.1 8 1.3s.1 0 .1-.1c.5-.3 1.4-.3 1.9.1L13.1 5l.1.1 1.2.9H18c-1.5 0-2.9-.6-4.2-1.7L10.7.6C9.9-.1 8.5-.2 7.5.4c0 .1-.1.1-.2.2L4.2 4.3C2.9 5.4 1.5 6 0 6h3.6l1.2-.9z" /></clipPath>
</svg>
{#if $tooltip.component}
<div class="popup" bind:clientWidth={clWidth} bind:clientHeight={clHeight} bind:this={tooltipHTML}>
<div class="popup" bind:clientWidth={clWidth} bind:this={tooltipHTML}>
{#if $tooltip.label}<div class="header"><Label label={$tooltip.label} /></div>{/if}
<svelte:component this={$tooltip.component} {...$tooltip.props} />
</div>