Skip to content

Commit e97f652

Browse files
settings nav button :) (#75)
* setting bav button all done :) * lint fixski * added component to index.ts
1 parent 80e2ade commit e97f652

File tree

6 files changed

+3301
-3882
lines changed

6 files changed

+3301
-3882
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<script context="module">
2+
import { LanguageSquareIcon } from "@hugeicons/core-free-icons";
3+
import { HugeiconsIcon } from "@hugeicons/svelte";
4+
5+
export { icon };
6+
</script>
7+
8+
{#snippet icon()}
9+
<HugeiconsIcon size={30} color="var(--color-black-500)" icon={LanguageSquareIcon} />
10+
{/snippet}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import type { Snippet } from "svelte";
2+
import { icon } from "./SettingsNavigationBtn.stories.snippet.svelte";
3+
import SettingsNavigationBtn from "./SettingsNavigationBtn.svelte";
4+
5+
export default {
6+
title: "Fragments/SettingsNavigationBtn",
7+
component: SettingsNavigationBtn,
8+
tags: ["autodocs"],
9+
render: (args: { icon: Snippet; label: string; onClick: () => void }) => ({
10+
Component: SettingsNavigationBtn,
11+
props: args,
12+
}),
13+
};
14+
15+
export const Primary = {
16+
args: {
17+
icon: icon,
18+
label: "Language",
19+
onClick: () => alert("asdf"),
20+
},
21+
};
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<script lang="ts">
2+
import { cn } from "$lib/utils";
3+
import { ArrowRight01Icon } from "@hugeicons/core-free-icons";
4+
import { HugeiconsIcon } from "@hugeicons/svelte";
5+
import type { Snippet } from "svelte";
6+
import type { HTMLAttributes } from "svelte/elements";
7+
8+
interface ISettingsNavigationBtn extends HTMLAttributes<HTMLElement> {
9+
icon: Snippet;
10+
label: string;
11+
onClick: () => void;
12+
}
13+
14+
let { icon, label, onClick, ...restProps }: ISettingsNavigationBtn = $props();
15+
</script>
16+
17+
<div {...restProps} class={cn('flex items-center justify-between px-3 py-2', restProps.class)} onclick={onClick}>
18+
<div class="flex items-center gap-2">
19+
<div class="p-3 bg-gray max-w-max rounded-4xl object-cover flex items-center" >
20+
{@render icon?.()}
21+
</div>
22+
<h1>{label}</h1>
23+
</div>
24+
<HugeiconsIcon size={30} color="var(--color-black-500)" icon={ArrowRight01Icon} />
25+
</div>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export { default as Header } from "./Header/Header.svelte";
2+
export { default as SettingsNavigationBtn } from "./SettingsNavigationBtn/SettingsNavigationBtn.svelte";

infrastructure/eid-wallet/src/lib/ui/Selector/Selector.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ interface ISelectorProps extends HTMLLabelAttributes {
1515
children?: Snippet;
1616
}
1717
18-
// biome-ignore lint/style/useConst: selected is bindable, can't be a const
1918
let {
2019
id,
2120
name,

0 commit comments

Comments
 (0)