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-04-01 16:29:24 +02:00
|
|
|
<script lang="typescript">
|
2021-04-09 18:59:57 +02:00
|
|
|
import type { ToolbarItem } from "./types";
|
2021-04-01 16:29:24 +02:00
|
|
|
import ButtonGroup from "./ButtonGroup.svelte";
|
|
|
|
|
2021-04-09 22:02:34 +02:00
|
|
|
export let id: string;
|
2021-04-01 16:29:24 +02:00
|
|
|
export let className = "";
|
|
|
|
|
|
|
|
function extendClassName(className: string): string {
|
2021-04-23 22:22:53 +02:00
|
|
|
return `dropdown-menu btn-dropdown-menu ${className}`;
|
2021-04-01 16:29:24 +02:00
|
|
|
}
|
|
|
|
|
2021-04-23 18:53:52 +02:00
|
|
|
export let items: ToolbarItem[];
|
2021-04-01 16:29:24 +02:00
|
|
|
</script>
|
|
|
|
|
2021-04-16 17:14:47 +02:00
|
|
|
<style>
|
2021-04-19 14:47:10 +02:00
|
|
|
:global(ul.btn-dropdown-menu) {
|
|
|
|
display: none;
|
2021-04-16 17:14:47 +02:00
|
|
|
background-color: var(--window-bg);
|
|
|
|
border-color: var(--medium-border);
|
|
|
|
}
|
2021-04-23 22:22:53 +02:00
|
|
|
|
|
|
|
:global(ul.btn-dropdown-menu.show) {
|
|
|
|
display: flex;
|
|
|
|
}
|
2021-04-16 17:14:47 +02:00
|
|
|
</style>
|
|
|
|
|
2021-04-23 18:53:52 +02:00
|
|
|
<ButtonGroup {id} className={extendClassName(className)} {items} />
|