mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 03:40:48 +00:00
remove editor from presenter for Boolean (#3090)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
b1f2a417a4
commit
3f3abd3e24
@ -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">
|
||||
|
Loading…
Reference in New Issue
Block a user