Skip to content

High performance self-hosted photo and video management solution.

487 B
Raw Blame
<script lang="ts">
  import MenuOption from '#lib/components/shared-components/context-menu/MenuOption.svelte';
  import { isEnabled } from '#lib/utils.ts';
  import { type ActionItem } from '@immich/ui';

  type Props = {
    action: ActionItem;
  };

  const { action }: Props = $props();
  const { title, icon, onAction } = $derived(action);
</script>

{#if icon && isEnabled(action)}
  <MenuOption {icon} text={title} onClick={(event: Event) => onAction({ event, action })} />
{/if}