anki/ts/editor-toolbar/ButtonDropdown.svelte
Henrik Giesel 1eafa7d9d0 Remove $$restProps and make explicit dropdown support in buttons
* Currently LabelButton, CommandIconButtton, and IconButton support dropdowns
2021-04-15 13:09:50 +02:00

16 lines
441 B
Svelte

<script lang="typescript">
import type { ToolbarItem } from "./types";
import ButtonGroup from "./ButtonGroup.svelte";
export let id: string;
export let className = "";
function extendClassName(className: string): string {
return `dropdown-menu bg-transparent border-0 ${className}`;
}
export let buttons: ToolbarItem[];
</script>
<ButtonGroup {id} className={extendClassName(className)} {buttons} />