init commit
This commit is contained in:
commit
c9d982669a
461 changed files with 30317 additions and 0 deletions
22
resources/js/components/Icon.svelte
Normal file
22
resources/js/components/Icon.svelte
Normal file
|
@ -0,0 +1,22 @@
|
|||
<script lang="ts">
|
||||
import * as icons from 'lucide-svelte';
|
||||
|
||||
interface Props {
|
||||
name: string;
|
||||
class?: string;
|
||||
size?: number | string;
|
||||
color?: string;
|
||||
strokeWidth?: number | string;
|
||||
}
|
||||
|
||||
let { name, class: className, size = 16, color, strokeWidth = 2 }: Props = $props();
|
||||
|
||||
const Component = $derived(() => {
|
||||
const iconName = name.charAt(0).toUpperCase() + name.slice(1);
|
||||
return (icons as Record<string, any>)[iconName];
|
||||
});
|
||||
|
||||
const styles = $derived(['h-4 w-4', className]);
|
||||
</script>
|
||||
|
||||
<Component class={styles} {size} {color} {strokeWidth} />
|
Loading…
Add table
Add a link
Reference in a new issue