1
0
mirror of https://github.com/immich-app/immich.git synced 2025-06-27 05:11:11 +02:00

refactor(web): albums list (2) (#8214)

* refactor: albums list

* fix: responsive design

* keep albums in sharing
This commit is contained in:
martin
2024-03-24 19:07:20 +01:00
committed by GitHub
parent 96a5710932
commit 5dc59b591d
7 changed files with 102 additions and 23 deletions

View File

@ -0,0 +1,20 @@
<script lang="ts">
export let filters: string[];
export let selected: string;
export let onSelect: (selected: string) => void;
</script>
<div class=" flex bg-gray-100 dark:bg-gray-700 rounded-lg">
{#each filters as filter, index}
<button
class="flex py-2 px-4 {filter === selected
? 'dark:bg-gray-900 bg-gray-300'
: 'dark:hover:bg-gray-800 hover:bg-gray-200'} {index === 0 ? 'rounded-l-lg' : ''} {index === filters.length - 1
? 'rounded-r-lg'
: ''}"
on:click={() => onSelect(filter)}
>
{filter}
</button>
{/each}
</div>