anki/ts/deck-options/CheckBoxRow.svelte
Damien Elmes d44b49294b make 'for' argument optional in TooltipLabel
The latest svelte-check has revealed we were not passing 'for' in
when we should have been. This is a quick hack to get the tests passing
again, but a better approach that actually makes this accessible again
would be good in the future.
2021-09-29 12:20:03 +10:00

26 lines
791 B
Svelte

<!--
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";
import CheckBox from "./CheckBox.svelte";
import RevertButton from "./RevertButton.svelte";
export let value: boolean;
export let defaultValue: boolean;
export let markdownTooltip: string | undefined = undefined;
</script>
<Row>
<Col>
<RevertButton bind:value {defaultValue} />
<CheckBox bind:value
>{#if markdownTooltip}<TooltipLabel {markdownTooltip}><slot /></TooltipLabel
>{:else}<slot />{/if}</CheckBox
>
</Col>
</Row>