anki/ts/image-occlusion/ImageOcclusionPicker.svelte

44 lines
1.3 KiB
Svelte
Raw Normal View History

<!--
Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="ts">
import * as tr from "@tslib/ftl";
import Container from "../components/Container.svelte";
import LabelButton from "../components/LabelButton.svelte";
export let onPickImage: () => void;
export let onPickImageFromClipboard: () => void;
</script>
<Container class="image-occlusion-picker">
<div id="io-pick-image-file" style="padding-top: 60px; text-align: center;">
<LabelButton
--border-left-radius="5px"
--border-right-radius="5px"
class="io-image-picker-button"
on:click={onPickImage}
>
{tr.notetypesIoSelectImage()}
</LabelButton>
</div>
<div id="io-pick-image-clipboard" style="padding-top: 30px; text-align: center;">
<LabelButton
--border-left-radius="5px"
--border-right-radius="5px"
class="io-image-picker-button"
on:click={onPickImageFromClipboard}
>
{tr.notetypesIoPasteImageFromClipboard()}
</LabelButton>
</div>
</Container>
<style lang="scss">
:global(.io-image-picker-button) {
margin: auto;
padding: 0px 8px 0px 8px !important;
}
</style>