Files
immich/web/src/lib/components/TableButton.svelte

15 lines
371 B
Svelte
Raw Normal View History

2025-11-11 07:42:33 -05:00
<script lang="ts">
import { IconButton, type ActionItem } from '@immich/ui';
2025-11-11 07:42:33 -05:00
type Props = {
action: ActionItem;
};
const { action }: Props = $props();
const { title, icon, onAction } = $derived(action);
2025-11-11 07:42:33 -05:00
</script>
{#if action.$if?.() ?? true}
<IconButton shape="round" color="primary" {icon} aria-label={title} onclick={() => onAction(action)} />
2025-11-11 07:42:33 -05:00
{/if}