mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 03:36:01 +00:00
21 lines
537 B
Svelte
21 lines
537 B
Svelte
<script lang="ts">
|
|
import _ from 'lodash';
|
|
|
|
import ToolStripCommandButton from './ToolStripCommandButton.svelte';
|
|
import ToolStripSplitDropDownButton from './ToolStripSplitDropDownButton.svelte';
|
|
|
|
export let commands;
|
|
export let hideDisabled = false;
|
|
export let buttonLabel = null;
|
|
|
|
$: menu = _.compact(commands).map(command => (_.isString(command) ? { command } : command));
|
|
</script>
|
|
|
|
<ToolStripCommandButton
|
|
command={commands[0]}
|
|
component={ToolStripSplitDropDownButton}
|
|
{menu}
|
|
{hideDisabled}
|
|
{buttonLabel}
|
|
/>
|