chart initial import

This commit is contained in:
Jan Prochazka
2021-03-19 20:12:13 +01:00
parent 75c578de47
commit 489c9a905c
17 changed files with 617 additions and 9 deletions

View File

@@ -0,0 +1,40 @@
<script lang="ts">
export let type;
export let label;
export let noMargin;
export let disabled = false;
export let labelProps: any = {};
</script>
<div class="row">
{#if type == 'checkbox'}
<slot />
<span {...labelProps} on:click={labelProps.onClick} class:disabled>{label}</span>
{:else}
<div class="label" {...labelProps} on:click={labelProps.onClick}>
<div class="label">
<span {...labelProps} on:click={labelProps.onClick} class:disabled>{label}</span>
</div>
</div>
<div class="value">
<slot />
</div>
{/if}
</div>
<style>
.row {
margin: 5px;
}
.label {
margin-bottom: 3px;
color: var(--theme-font-3);
}
.disabled {
color: var(--theme-font-3);
}
.value {
margin-left: 15px;
margin-top: 3px;
}
</style>