mirror of
https://github.com/immich-app/immich.git
synced 2025-06-16 03:57:33 -04:00
* Show context menu * Show context menu at the correct location * Implement delete album button * Delete album within album viewer
27 lines
464 B
Svelte
27 lines
464 B
Svelte
<script>
|
|
import { createEventDispatcher } from 'svelte';
|
|
|
|
export let isDisabled = false;
|
|
export let text = '';
|
|
|
|
const dispatch = createEventDispatcher();
|
|
|
|
const handleClick = () => {
|
|
if (isDisabled) return;
|
|
|
|
dispatch('click');
|
|
};
|
|
</script>
|
|
|
|
<button
|
|
class:disabled={isDisabled}
|
|
on:click={handleClick}
|
|
class="bg-white hover:bg-immich-bg transition-all p-4 w-full text-left rounded-lg text-sm"
|
|
>
|
|
{#if text}
|
|
{text}
|
|
{:else}
|
|
<slot />
|
|
{/if}
|
|
</button>
|