anki/ts/deckoptions/SpinBoxRow.svelte

28 lines
803 B
Svelte
Raw Normal View History

2021-05-29 12:29:22 +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 Row from "./Row.svelte";
import Col from "./Col.svelte";
import TooltipLabel from "./TooltipLabel.svelte";
2021-05-29 12:29:22 +02:00
import SpinBox from "./SpinBox.svelte";
import RevertButton from "./RevertButton.svelte";
export let value: any;
export let defaultValue: any;
export let min = 0;
export let max: number | undefined = undefined;
2021-05-29 12:29:22 +02:00
export let markdownTooltip: string;
</script>
<Row>
<Col size={7}>
<RevertButton bind:value {defaultValue} />
<TooltipLabel {markdownTooltip}><slot /></TooltipLabel>
2021-05-29 12:29:22 +02:00
</Col>
<Col size={5}>
<SpinBox bind:value {min} {max} />
2021-05-29 12:29:22 +02:00
</Col>
</Row>