feat: implement YearNav component
This commit is contained in:
20
src/lib/components/molecules/YearNav.svelte
Normal file
20
src/lib/components/molecules/YearNav.svelte
Normal file
@@ -0,0 +1,20 @@
|
||||
<script lang="ts">
|
||||
import Button from '../atoms/Button.svelte';
|
||||
|
||||
type Props = {
|
||||
years: Year[];
|
||||
};
|
||||
|
||||
let { years }: Props = $props();
|
||||
</script>
|
||||
|
||||
<div class="mb-6 flex flex-col items-start justify-between gap-4 sm:flex-row sm:items-center">
|
||||
<div class="flex items-center gap-2">
|
||||
<Button variant="secondary" href="/">Prezenty tego roku</Button>
|
||||
{#each years as year}
|
||||
<Button href={`/year/${year.year}`} variant="secondary">
|
||||
{year.year}
|
||||
</Button>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user