mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-14 12:25:17 +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">
|
<script lang="ts">
|
||||||
import { BooleanIcon, Label } from '@hcengineering/ui'
|
import { BooleanIcon, Label } from '@hcengineering/ui'
|
||||||
import { getBooleanLabel } from '../utils'
|
import { getBooleanLabel } from '../utils'
|
||||||
import BooleanEditor from './BooleanEditor.svelte'
|
|
||||||
|
|
||||||
export let value: any
|
export let value: any
|
||||||
export let inline: boolean = false
|
export let inline: boolean = false
|
||||||
export let onChange: ((value: any) => void) | undefined = undefined
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="{inline ? 'inline-presenter' : 'flex-presenter'} yesno-container">
|
<div class="{inline ? 'inline-presenter' : 'flex-presenter'} yesno-container">
|
||||||
{#if onChange !== undefined}
|
<div class="icon small-gap"><BooleanIcon {value} /></div>
|
||||||
<BooleanEditor {onChange} {value} />
|
<span><Label label={getBooleanLabel(value)} /></span>
|
||||||
{:else}
|
|
||||||
<div class="icon small-gap"><BooleanIcon {value} /></div>
|
|
||||||
<span><Label label={getBooleanLabel(value)} /></span>
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
Loading…
Reference in New Issue
Block a user