remove editor from presenter for Boolean (#3090)

Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
Vyacheslav Tumanov 2023-04-27 18:00:59 +05:00 committed by GitHub
parent b1f2a417a4
commit 3f3abd3e24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,20 +16,14 @@
<script lang="ts">
import { BooleanIcon, Label } from '@hcengineering/ui'
import { getBooleanLabel } from '../utils'
import BooleanEditor from './BooleanEditor.svelte'
export let value: any
export let inline: boolean = false
export let onChange: ((value: any) => void) | undefined = undefined
</script>
<div class="{inline ? 'inline-presenter' : 'flex-presenter'} yesno-container">
{#if onChange !== undefined}
<BooleanEditor {onChange} {value} />
{:else}
<div class="icon small-gap"><BooleanIcon {value} /></div>
<span><Label label={getBooleanLabel(value)} /></span>
{/if}
<div class="icon small-gap"><BooleanIcon {value} /></div>
<span><Label label={getBooleanLabel(value)} /></span>
</div>
<style lang="scss">