Skip to content

Commit

Permalink
add descriptions and update links
Browse files Browse the repository at this point in the history
  • Loading branch information
MaHaWo committed Aug 21, 2024
1 parent b004afb commit 0021fe3
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 8 deletions.
10 changes: 9 additions & 1 deletion src/lib/components/DataInput/AbstractDataInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,18 @@
export let data;
export let heading;
export let itemComponent; // = AbstractDropdownItem;
export let description;
</script>

<div class="items-center space-x-4 rtl:space-x-reverse">
<h1 class="mb-2 text-2xl font-bold tracking-tight text-gray-700 dark:text-gray-400">{heading}</h1>
<h1 class="mb-6 text-2xl font-bold tracking-tight text-gray-700 dark:text-gray-400">{heading}</h1>
<p class="mb-6 text-lg font-normal leading-tight text-gray-700 dark:text-gray-400">
{description}
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Animi, iste nisi amet tempora laborum natus
dolorum quis consectetur non ab nemo sint deleniti officiis enim a explicabo possimus. Voluptatem
repellat autem dicta unde ducimus. Commodi fugiat, error magnam necessitatibus fugit blanditiis cum
itaque nostrum quaerat, pariatur aperiam ipsum sed quo!
</p>
{#each data as data_element}
<svelte:component this={itemComponent} data={data_element} />
{/each}
Expand Down
11 changes: 8 additions & 3 deletions src/routes/firstdropdown/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
const letteroptions = ['a', 'b', 'c', 'd'];
const defaultOptions = ['gar nicht', 'ansatzweise', 'weitgehend', 'zuverlässig'];
const description = 'This is a dummy dropdown page to test the dropdown component';
const data_to_display = [
{
name: 'standing up',
Expand All @@ -31,6 +31,11 @@
const heading = 'some initial dummy dropdown page';
</script>

<AbstractContent showBottomNavbar={true} lastpage="/" nextpage="/nextdropdown" infopage="/info">
<AbstractDataInput data={data_to_display} {heading} itemComponent={AbstractDropdownItem} />
<AbstractContent showBottomNavbar={true} lastpage={'/'} nextpage={'/nextdropdown'} infopage="/info">
<AbstractDataInput
data={data_to_display}
{heading}
itemComponent={AbstractDropdownItem}
{description}
/>
</AbstractContent>
2 changes: 1 addition & 1 deletion src/routes/info/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
import AbstractContent from '$lib/components/AbstractContent.svelte';
</script>

<AbstractContent showBottomNavbar={true} lastPage="/" nextPage="/" infoPage="/info">
<AbstractContent showBottomNavbar={true} lastpage="/" nextpage="/" infoPage="/info">
<h1>Info page</h1>
</AbstractContent>
16 changes: 13 additions & 3 deletions src/routes/nextdropdown/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import AbstractDropdownItem from '$lib/components/DataInput/AbstractDropdownItem.svelte';
const defaultOptions = ['gar nicht', 'ansatzweise', 'weitgehend', 'zuverlässig'];
const description = 'This is the second data selection page to test the dropdown component';
const dropdownData = [
{
name: 'standing up',
Expand Down Expand Up @@ -37,6 +37,16 @@
const heading = 'the second data selection page';
</script>

<AbstractContent showBottomNavbar={true} lastPage="/firstdropdown" nextPage="/" infoPage="/info">
<AbstractDataInput data={dropdownData} {heading} itemComponent={AbstractDropdownItem} />
<AbstractContent
showBottomNavbar={true}
lastpage={'/firstdropdown'}
nextpage={'/'}
infopage="/info"
>
<AbstractDataInput
data={dropdownData}
{heading}
itemComponent={AbstractDropdownItem}
{description}
/>
</AbstractContent>

0 comments on commit 0021fe3

Please sign in to comment.