mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
* Show context menu * Show context menu at the correct location * Implement delete album button * Delete album within album viewer
41 lines
1 KiB
Svelte
41 lines
1 KiB
Svelte
<script lang="ts">
|
|
/**
|
|
* This is the circle icon component.
|
|
*/
|
|
import { createEventDispatcher } from 'svelte';
|
|
|
|
export let logo: any;
|
|
export let backgroundColor: string = 'transparent';
|
|
export let hoverColor: string = '#e2e7e9';
|
|
export let logoColor: string = '#5f6368';
|
|
export let size = '24';
|
|
export let title = '';
|
|
let iconButton: HTMLButtonElement;
|
|
const dispatch = createEventDispatcher();
|
|
|
|
$: {
|
|
if (iconButton) {
|
|
iconButton.style.backgroundColor = backgroundColor;
|
|
iconButton.style.setProperty('--immich-icon-button-hover-color', hoverColor);
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<button
|
|
{title}
|
|
bind:this={iconButton}
|
|
class={`immich-circle-icon-button rounded-full p-3 flex place-items-center place-content-center transition-all`}
|
|
on:click={(mouseEvent) => dispatch('click', { mouseEvent })}
|
|
>
|
|
<svelte:component this={logo} {size} color={logoColor} />
|
|
</button>
|
|
|
|
<style>
|
|
:root {
|
|
--immich-icon-button-hover-color: #d3d3d3;
|
|
}
|
|
|
|
.immich-circle-icon-button:hover {
|
|
background-color: var(--immich-icon-button-hover-color) !important;
|
|
}
|
|
</style>
|