mirror of
https://github.com/immich-app/immich.git
synced 2026-01-19 00:05:50 -08:00
16 lines
422 B
Svelte
16 lines
422 B
Svelte
<script lang="ts">
|
|
import { IconButton, type ActionItem, type Size } from '@immich/ui';
|
|
|
|
type Props = {
|
|
action: ActionItem;
|
|
size?: Size;
|
|
};
|
|
|
|
const { action, size }: Props = $props();
|
|
const { title, icon, onAction } = $derived(action);
|
|
</script>
|
|
|
|
{#if icon && (action.$if?.() ?? true)}
|
|
<IconButton {size} shape="round" color="primary" {icon} aria-label={title} onclick={() => onAction(action)} />
|
|
{/if}
|