2022-06-03 11:04:30 -05:00
|
|
|
<script lang="ts">
|
2023-02-10 23:17:39 +01:00
|
|
|
import type Icon from 'svelte-material-icons/AbTesting.svelte';
|
2022-06-03 11:04:30 -05:00
|
|
|
|
2023-02-10 23:17:39 +01:00
|
|
|
export let logo: typeof Icon;
|
2022-09-08 17:30:49 +02:00
|
|
|
export let backgroundColor = 'transparent';
|
|
|
|
|
export let hoverColor = '#e2e7e9';
|
2022-07-23 13:08:49 -05:00
|
|
|
export let size = '24';
|
|
|
|
|
export let title = '';
|
2023-05-09 17:10:13 +02:00
|
|
|
export let isOpacity = false;
|
2023-06-14 20:47:18 -05:00
|
|
|
export let forceDark = false;
|
2023-06-20 16:36:38 +02:00
|
|
|
export let hideMobile = false;
|
2022-06-03 11:04:30 -05:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<button
|
2022-07-23 13:08:49 -05:00
|
|
|
{title}
|
2023-05-18 17:43:09 +02:00
|
|
|
style:background-color={backgroundColor}
|
2023-02-10 23:17:39 +01:00
|
|
|
style:--immich-icon-button-hover-color={hoverColor}
|
2023-06-14 20:47:18 -05:00
|
|
|
class:dark:text-immich-dark-fg={!forceDark}
|
|
|
|
|
class="rounded-full p-3 flex place-items-center place-content-center transition-all
|
|
|
|
|
{isOpacity ? 'hover:bg-immich-bg/30' : 'immich-circle-icon-button hover:dark:text-immich-dark-gray'}
|
2023-06-20 16:36:38 +02:00
|
|
|
{forceDark && 'hover:text-black'}
|
|
|
|
|
{hideMobile && 'hidden sm:flex'}"
|
2023-02-10 23:17:39 +01:00
|
|
|
on:click
|
2022-06-03 11:04:30 -05:00
|
|
|
>
|
2022-10-26 11:10:48 -05:00
|
|
|
<svelte:component this={logo} {size} />
|
2023-04-26 04:30:19 +02:00
|
|
|
<slot />
|
2022-06-03 11:04:30 -05:00
|
|
|
</button>
|
2022-07-23 13:08:49 -05:00
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
:root {
|
|
|
|
|
--immich-icon-button-hover-color: #d3d3d3;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.immich-circle-icon-button:hover {
|
|
|
|
|
background-color: var(--immich-icon-button-hover-color) !important;
|
|
|
|
|
}
|
|
|
|
|
</style>
|