Skip to content

Commit 18ee03a

Browse files
committed
feat: added icons
1 parent 011e42b commit 18ee03a

File tree

2 files changed

+31
-8
lines changed

2 files changed

+31
-8
lines changed

infrastructure/control-panel/src/lib/fragments/TableCardHeader/TableCardHeader.svelte

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
11
<script lang="ts">
2+
import { Search01FreeIcons } from '@hugeicons/core-free-icons';
3+
import { HugeiconsIcon } from '@hugeicons/svelte';
4+
25
let {
36
title,
47
searchValue = $bindable(''),
58
rightTitle,
69
placeholder
7-
}: { title: string; searchValue: string; rightTitle: string, placeholder: string } = $props();
10+
}: { title: string; searchValue: string; rightTitle: string; placeholder: string } = $props();
811
</script>
912

1013
<header class="mb-4 flex w-full items-center justify-between px-4">
1114
<div class="flex items-center gap-4">
1215
<p class="text-black-700 font-semibold whitespace-nowrap">{title}</p>
13-
<input
14-
type="text"
15-
placeholder={placeholder}
16-
bind:value={searchValue}
17-
class="bg-black-100 text-black-700 placeholder:text-black-700 w-full rounded-[8px] border border-gray-300 px-4 py-1.5 text-xs outline-0"
18-
/>
16+
<div class="relative w-full">
17+
<input
18+
type="text"
19+
{placeholder}
20+
bind:value={searchValue}
21+
class="bg-black-100 text-black-700 placeholder:text-black-700 w-full rounded-[8px] border border-gray-300 px-4 py-1.5 pr-10 text-xs outline-0"
22+
/>
23+
<span class="text-black-700 absolute top-1/2 right-3 h-4 w-4 -translate-y-1/2">
24+
<HugeiconsIcon
25+
icon={Search01FreeIcons}
26+
size="16px"
27+
color="var(--color-black-500)"
28+
/>
29+
</span>
30+
</div>
1931
</div>
2032

2133
<div class="flex items-center gap-2">

infrastructure/control-panel/src/routes/+layout.svelte

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import { goto } from '$app/navigation';
33
import { page } from '$app/state';
44
import { ButtonAction } from '$lib/ui';
5+
import { HugeiconsIcon } from '@hugeicons/svelte';
6+
import { RefreshFreeIcons } from '@hugeicons/core-free-icons';
57
import '../app.css';
68
79
let { children } = $props();
@@ -15,7 +17,16 @@
1517
<h4 class="text-primary text-xl font-semibold">Control Panel</h4>
1618
{#if pageUrl === '/'}
1719
<div class="flex items-center gap-4">
18-
<ButtonAction size="sm" variant="soft">Refresh</ButtonAction>
20+
<ButtonAction size="sm" variant="soft">
21+
Refresh
22+
<span class="ms-2">
23+
<HugeiconsIcon
24+
icon={RefreshFreeIcons}
25+
color="var(--color-primary)"
26+
size="20px"
27+
/>
28+
</span>
29+
</ButtonAction>
1930
<ButtonAction
2031
size="sm"
2132
class="whitespace-nowrap"

0 commit comments

Comments
 (0)