🛠️ Upgrade custom icons props

This commit is contained in:
pheralb 2025-01-31 09:33:34 +00:00
parent 6598247779
commit 83845e2dd3
9 changed files with 44 additions and 16 deletions

View File

@ -1,5 +1,6 @@
<script lang="ts"> <script lang="ts">
export let iconSize: number; import type { IconProps } from '@/types/icons';
let { iconSize }: IconProps = $props();
</script> </script>
<svg <svg

View File

@ -1,5 +1,6 @@
<script lang="ts"> <script lang="ts">
export let iconSize: number; import type { IconProps } from '@/types/icons';
let { iconSize }: IconProps = $props();
</script> </script>
<svg <svg

View File

@ -1,5 +1,11 @@
<script lang="ts">
import type { IconProps } from '@/types/icons';
let { iconSize }: IconProps = $props();
</script>
<svg <svg
width="30" width={iconSize || 30}
height={iconSize || 30}
name="SVGL Logo" name="SVGL Logo"
viewBox="0 0 512 512" viewBox="0 0 512 512"
fill="none" fill="none"

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
export let iconSize: number; import type { IconProps } from '@/types/icons';
export let className: string; let { iconSize, className }: IconProps = $props();
</script> </script>
<svg <svg

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,6 @@
<script lang="ts"> <script lang="ts">
export let iconSize: number; import type { IconProps } from '@/types/icons';
let { iconSize, color }: IconProps = $props();
</script> </script>
<svg <svg

View File

@ -1,5 +1,6 @@
<script lang="ts"> <script lang="ts">
export let iconSize: number; import type { IconProps } from '@/types/icons';
let { iconSize }: IconProps = $props();
</script> </script>
<svg <svg

View File

@ -1,5 +1,6 @@
<script lang="ts"> <script lang="ts">
export let iconSize: number; import type { IconProps } from '@/types/icons';
let { iconSize }: IconProps = $props();
</script> </script>
<svg <svg

5
src/types/icons.ts Normal file
View File

@ -0,0 +1,5 @@
export interface IconProps {
iconSize: number;
className?: string;
color?: string;
}