immich/web/src/lib/components/shared-components/context-menu/menu-option.svelte
Alex 2cf42e867c
feat(web): add some material design 3 styling to forms and ui elements (#1798)
* stlye: forms

* style: navigation bar

* style: user profile popup

* style: context menu

* fix: prettier

* style: manage account dark theme color

* style: user profile image border; fix: profile panel z-index

* style: border for profile image on hover and scrolling in administration page

* style: font size

* style: gap between day in a row
2023-02-19 23:29:06 -06:00

26 lines
493 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-slate-100 hover:bg-gray-200 dark:text-immich-dark-bg transition-all p-4 w-full text-left text-sm font-medium"
>
{#if text}
{text}
{:else}
<slot />
{/if}
</button>