mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
refactor(web): albums list (2) (#8214)
* refactor: albums list * fix: responsive design * keep albums in sharing
This commit is contained in:
parent
96a5710932
commit
5dc59b591d
7 changed files with 102 additions and 23 deletions
20
web/src/lib/components/elements/group-tab.svelte
Normal file
20
web/src/lib/components/elements/group-tab.svelte
Normal 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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue