Naposledy aktivní 1 month ago

This way we can define custom icon while mimicking lucide's api

tahta revidoval tento gist 1 month ago. Přejít na revizi

1 file changed, 17 insertions, 17 deletions

CustomIcon.svelte

@@ -1,22 +1,22 @@
1 - <script>
2 - export let size = 24;
3 - export let color = "currentColor";
4 - export let strokeWidth = 2;
1 + <script lang="ts">
2 + import type { IconProps } from '@lucide/svelte';
3 +
4 + let { size = 24, color = 'currentColor', strokeWidth = 2, ...restProps }: IconProps = $props();
5 5 </script>
6 6
7 7 <svg
8 - xmlns="http://www.w3.org/2000/svg"
9 - width={size}
10 - height={size}
11 - viewBox="0 0 24 24"
12 - fill="none"
13 - stroke={color}
14 - stroke-width={strokeWidth}
15 - stroke-linecap="round"
16 - stroke-linejoin="round"
17 - {...$$restProps}
8 + xmlns="http://www.w3.org/2000/svg"
9 + width={size}
10 + height={size}
11 + viewBox="0 0 24 24"
12 + fill="none"
13 + stroke={color}
14 + stroke-width={strokeWidth}
15 + stroke-linecap="round"
16 + stroke-linejoin="round"
17 + {...restProps}
18 18 >
19 - <path d="M12 2L2 7l10 5 10-5-10-5z" />
20 - <path d="M2 17l10 5 10-5" />
21 - <path d="M2 12l10 5 10-5" />
19 + <path d="M12 2L2 7l10 5 10-5-10-5z" />
20 + <path d="M2 17l10 5 10-5" />
21 + <path d="M2 12l10 5 10-5" />
22 22 </svg>

tahta revidoval tento gist 1 month ago. Přejít na revizi

1 file changed, 1 deletion

CustomIcon.svelte

@@ -1,4 +1,3 @@
1 - <-- This way we can define custom icon while mimicking lucide's api -->
2 1 <script>
3 2 export let size = 24;
4 3 export let color = "currentColor";

tahta revidoval tento gist 1 month ago. Přejít na revizi

1 file changed, 23 insertions

CustomIcon.svelte(vytvořil soubor)

@@ -0,0 +1,23 @@
1 + <-- This way we can define custom icon while mimicking lucide's api -->
2 + <script>
3 + export let size = 24;
4 + export let color = "currentColor";
5 + export let strokeWidth = 2;
6 + </script>
7 +
8 + <svg
9 + xmlns="http://www.w3.org/2000/svg"
10 + width={size}
11 + height={size}
12 + viewBox="0 0 24 24"
13 + fill="none"
14 + stroke={color}
15 + stroke-width={strokeWidth}
16 + stroke-linecap="round"
17 + stroke-linejoin="round"
18 + {...$$restProps}
19 + >
20 + <path d="M12 2L2 7l10 5 10-5-10-5z" />
21 + <path d="M2 17l10 5 10-5" />
22 + <path d="M2 12l10 5 10-5" />
23 + </svg>
Novější Starší