mirror of
https://github.com/samsonjs/immich.git
synced 2026-04-01 10:25:59 +00:00
14 lines
410 B
Svelte
14 lines
410 B
Svelte
<script lang="ts">
|
|
import { IconButton, type ActionItem } from '@immich/ui';
|
|
|
|
type Props = {
|
|
action: ActionItem;
|
|
};
|
|
|
|
const { action }: Props = $props();
|
|
const { title, icon, color = 'secondary', onAction } = $derived(action);
|
|
</script>
|
|
|
|
{#if icon && (action.$if?.() ?? true)}
|
|
<IconButton variant="ghost" shape="round" {color} {icon} aria-label={title} onclick={() => onAction(action)} />
|
|
{/if}
|