mirror of
https://github.com/immich-app/immich.git
synced 2026-01-15 06:23:00 -08:00
15 lines
400 B
Svelte
15 lines
400 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 action.$if?.() ?? true}
|
|
<IconButton variant="ghost" shape="round" {color} {icon} aria-label={title} onclick={() => onAction(action)} />
|
|
{/if}
|