Skip to content

Commit

Permalink
start working on dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
MaHaWo committed Aug 20, 2024
1 parent bb734ad commit 781a78b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
19 changes: 19 additions & 0 deletions src/lib/components/AbstractDropdown.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<script>
export class DropdownData {
constructor(items, name) {
this.items = items;
this.name = name;
this.selected = false;
}
}
export let dropdownData = [
new DropdownData([1, 2, 3], 'numbers'),
new DropdownData(['a', 'b', 'c'], 'letters'),
new DropdownData(['lamb', 'fox', 'lion'], 'animals')
];
</script>

<div>
{#each dropdownData as dropdown}{/each}
</div>
15 changes: 10 additions & 5 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<script>
import logo_dark from '$lib/assets/mondey_dark.svg';
import logo_light from '$lib/assets/mondey_light.svg';
import AbstractDropdown from '$lib/components/AbstractDropdown.svelte';
import {
P,
Banner,
DarkMode,
Navbar,
NavBrand,
NavHamburger,
NavLi,
NavUl,
NavHamburger,
DarkMode
P
} from 'flowbite-svelte';
import logo_light from '$lib/assets/mondey_light.svg';
import logo_dark from '$lib/assets/mondey_dark.svg';
</script>

<Banner><P>This is a work-in-progress prototype frontend for the MONDEY website</P></Banner>
Expand All @@ -29,3 +30,7 @@
<DarkMode />
</Navbar>
<div class="flex flex-col items-center justify-center"></div>

<div>
<AbstractDropdown></AbstractDropdown>
</div>

0 comments on commit 781a78b

Please sign in to comment.