mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-15 01:45:06 +00:00
refactor: migrate shadcn-components to Svelte 5 and TW4 (#551)
Co-authored-by: Elias Schneider <login@eliasschneider.com>
This commit is contained in:
committed by
Elias Schneider
parent
05b443d984
commit
28c85990ba
@@ -1,11 +1,18 @@
|
||||
<script lang="ts">
|
||||
export let icon: ConstructorOfATypedSvelteComponent;
|
||||
export let name: string;
|
||||
export let description: string;
|
||||
import type { Icon as IconType } from '@lucide/svelte';
|
||||
interface Props {
|
||||
icon: typeof IconType;
|
||||
name: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
let { icon, name, description }: Props = $props();
|
||||
|
||||
const SvelteComponent = $derived(icon);
|
||||
</script>
|
||||
|
||||
<div class="flex items-center">
|
||||
<div class="bg-muted mr-5 rounded-lg p-2"><svelte:component this={icon} /></div>
|
||||
<div class="bg-muted mr-5 rounded-lg p-2"><SvelteComponent /></div>
|
||||
<div class="text-start">
|
||||
<h3 class="font-semibold">{name}</h3>
|
||||
<p class="text-muted-foreground text-sm">{description}</p>
|
||||
|
||||
Reference in New Issue
Block a user