mirror of
https://github.com/immich-app/immich.git
synced 2025-11-24 11:20:40 +09:00
refactor(web): centralize buttons (#2200)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<script lang="ts">
|
||||
import type Icon from 'svelte-material-icons/AbTesting.svelte';
|
||||
|
||||
export let logo: typeof Icon;
|
||||
export let backgroundColor = 'transparent';
|
||||
export let hoverColor = '#e2e7e9';
|
||||
export let size = '24';
|
||||
export let title = '';
|
||||
</script>
|
||||
|
||||
<button
|
||||
{title}
|
||||
style:backgroundColor
|
||||
style:--immich-icon-button-hover-color={hoverColor}
|
||||
class="immich-circle-icon-button dark:text-immich-dark-fg hover:dark:text-immich-dark-gray rounded-full p-3 flex place-items-center place-content-center transition-all"
|
||||
on:click
|
||||
>
|
||||
<svelte:component this={logo} {size} />
|
||||
</button>
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--immich-icon-button-hover-color: #d3d3d3;
|
||||
}
|
||||
|
||||
.immich-circle-icon-button:hover {
|
||||
background-color: var(--immich-icon-button-hover-color) !important;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user