Skip to content

Commit 193594c

Browse files
authored
refactor(StatusIcon): port forward replace Snippet with Component (podman-desktop#12228)
Signed-off-by: axel7083 <[email protected]>
1 parent 2b2d5fa commit 193594c

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<script lang="ts">
2+
import { faEthernet } from '@fortawesome/free-solid-svg-icons/faEthernet';
3+
import Fa from 'svelte-fa';
4+
</script>
5+
6+
<Fa class="w-[20px]" scale={1.5} icon={faEthernet} />
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
<script lang="ts">
2-
import { faEthernet } from '@fortawesome/free-solid-svg-icons';
32
import { StatusIcon } from '@podman-desktop/ui-svelte';
4-
import Fa from 'svelte-fa';
53
64
import type { ForwardConfig } from '/@api/kubernetes-port-forward-model';
75
6+
import EthernetIcon from './EthernetIcon.svelte';
7+
88
interface Props {
99
object: ForwardConfig;
1010
}
1111
let { object }: Props = $props();
1212
</script>
1313

14-
{#snippet Ethernet()}
15-
<Fa class="w-[20px]" scale={1.5} icon={faEthernet} />
16-
{/snippet}
17-
1814
{#if object}
19-
<StatusIcon status="RUNNING" icon={Ethernet} />
15+
<StatusIcon status="RUNNING" icon={EthernetIcon} />
2016
{/if}

0 commit comments

Comments
 (0)