High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
<script lang="ts">
import type { HeaderButtonActionItem } from '#lib/types.ts';
import { Button, type Variants } from '@immich/ui';
type Props = {
action: HeaderButtonActionItem;
variant?: Variants;
};
const { action, variant = 'ghost' }: Props = $props();
const { title, icon, color = 'secondary', onAction } = $derived(action);
</script>
{#if action.$if?.() ?? true}
<Button
{variant}
size="small"
{color}
leadingIcon={icon}
onclick={(event: MouseEvent) => onAction({ event, action })}
title={action.data?.title}
>
{title}
</Button>
{/if}