2021-05-29 13:06:17 +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">
|
2021-11-17 04:49:52 +01:00
|
|
|
import Col from "../components/Col.svelte";
|
2022-02-04 09:36:34 +01:00
|
|
|
import Row from "../components/Row.svelte";
|
|
|
|
import type { Breakpoint } from "../components/types";
|
2021-05-29 13:06:17 +02:00
|
|
|
import EnumSelector from "./EnumSelector.svelte";
|
|
|
|
import RevertButton from "./RevertButton.svelte";
|
2022-02-04 09:36:34 +01:00
|
|
|
import TooltipLabel from "./TooltipLabel.svelte";
|
2021-05-29 13:06:17 +02:00
|
|
|
|
|
|
|
export let value: number;
|
|
|
|
export let defaultValue: number;
|
|
|
|
export let breakpoint: Breakpoint = "md";
|
|
|
|
export let choices: string[];
|
2022-02-10 00:55:43 +01:00
|
|
|
export let disabled: number[] = [];
|
2021-05-29 13:06:17 +02:00
|
|
|
export let markdownTooltip: string;
|
|
|
|
</script>
|
|
|
|
|
2021-11-17 04:49:52 +01:00
|
|
|
<Row --cols={12}>
|
|
|
|
<Col --col-size={7} {breakpoint}>
|
2021-06-11 23:15:40 +02:00
|
|
|
<TooltipLabel {markdownTooltip}><slot /></TooltipLabel>
|
2021-05-29 13:06:17 +02:00
|
|
|
</Col>
|
2021-11-17 04:49:52 +01:00
|
|
|
<Col --col-size={5} {breakpoint}>
|
2022-09-27 04:16:45 +02:00
|
|
|
<EnumSelector bind:value options={choices} {disabled} />
|
2021-06-22 01:41:31 +02:00
|
|
|
<RevertButton bind:value {defaultValue} />
|
2021-05-29 13:06:17 +02:00
|
|
|
</Col>
|
|
|
|
</Row>
|