Files
dbgate/packages/web/src/buttons/ToolStripCommandSplitButton.svelte
SPRINX0\prochazka 5205839e18 AI assistant e2e test
2025-02-10 14:17:22 +01:00

22 lines
556 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}
{...$$restProps}
/>