2021-05-29 13:30:10 +02:00
|
|
|
<!--
|
|
|
|
Copyright: Ankitects Pty Ltd and contributors
|
|
|
|
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
-->
|
|
|
|
<script lang="ts">
|
|
|
|
import marked from "marked";
|
|
|
|
import Row from "./Row.svelte";
|
|
|
|
import Col from "./Col.svelte";
|
2021-06-05 14:33:35 +02:00
|
|
|
import WithTooltip from "./WithTooltip.svelte";
|
|
|
|
import Label from "./Label.svelte";
|
2021-05-29 13:30:10 +02:00
|
|
|
import SpinBoxFloat from "./SpinBoxFloat.svelte";
|
|
|
|
import RevertButton from "./RevertButton.svelte";
|
|
|
|
|
|
|
|
export let value: any;
|
|
|
|
export let defaultValue: any;
|
|
|
|
export let min = 0;
|
|
|
|
export let max: number | undefined = undefined;
|
|
|
|
export let markdownTooltip: string;
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<Row>
|
|
|
|
<Col size={7}>
|
2021-06-05 14:33:35 +02:00
|
|
|
<WithTooltip tooltip={marked(markdownTooltip)} let:createTooltip>
|
|
|
|
<Label on:mount={(event) => createTooltip(event.detail.span)}
|
|
|
|
><slot /></Label
|
|
|
|
>
|
|
|
|
</WithTooltip>
|
2021-05-29 13:30:10 +02:00
|
|
|
</Col>
|
|
|
|
<Col size={5}>
|
|
|
|
<SpinBoxFloat bind:value {min} {max} />
|
|
|
|
<RevertButton bind:value {defaultValue} />
|
|
|
|
</Col>
|
|
|
|
</Row>
|