anki/ts/editor-toolbar/IconButton.svelte

31 lines
702 B
Svelte
Raw Normal View History

2021-04-15 15:59:52 +02:00
<!--
Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
2021-03-29 14:54:10 +02:00
<script lang="typescript">
import SquareButton from "./SquareButton.svelte";
2021-03-29 14:54:10 +02:00
export let id: string;
2021-03-29 21:05:30 +02:00
export let className = "";
2021-04-22 14:54:29 +02:00
export let tooltip: string | undefined;
export let shortcutLabel: string | undefined;
export let icon: string;
2021-04-01 18:55:34 +02:00
export let onClick: (event: MouseEvent) => void;
export let disables = true;
export let dropdownToggle = false;
2021-03-29 14:54:10 +02:00
</script>
<SquareButton
{id}
{className}
{tooltip}
{shortcutLabel}
{onClick}
{disables}
{dropdownToggle}
on:mount>
2021-03-30 00:51:44 +02:00
{@html icon}
</SquareButton>