From 82b89aa20b7f5dab8ff7308a6b661c30cc2eb710 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 21 Jun 2023 08:05:59 -0500 Subject: [PATCH] feat(web): custom drop down button (#2887) * feat(web): custom drop down button * fix test * fix test --- .../lib/components/elements/dropdown.svelte | 62 +++++++++++++++++++ web/src/routes/(user)/albums/+page.svelte | 22 +------ 2 files changed, 65 insertions(+), 19 deletions(-) create mode 100644 web/src/lib/components/elements/dropdown.svelte diff --git a/web/src/lib/components/elements/dropdown.svelte b/web/src/lib/components/elements/dropdown.svelte new file mode 100644 index 0000000000..4afc4acbb3 --- /dev/null +++ b/web/src/lib/components/elements/dropdown.svelte @@ -0,0 +1,62 @@ + + + diff --git a/web/src/routes/(user)/albums/+page.svelte b/web/src/routes/(user)/albums/+page.svelte index 851c37c167..bbee578016 100644 --- a/web/src/routes/(user)/albums/+page.svelte +++ b/web/src/routes/(user)/albums/+page.svelte @@ -12,18 +12,13 @@ import LinkButton from '$lib/components/elements/buttons/link-button.svelte'; import { onMount } from 'svelte'; import { flip } from 'svelte/animate'; + import Dropdown from '$lib/components/elements/dropdown.svelte'; export let data: PageData; const sortByOptions = ['Most recent photo', 'Last modified', 'Album title']; - let selectedSortBy = sortByOptions[0]; - const handleChangeSortBy = (e: Event) => { - const target = e.target as HTMLSelectElement; - selectedSortBy = target.value; - }; - const { albums: unsortedAlbums, isShowContextMenu, @@ -84,25 +79,14 @@
- - -
Create album
+ +