@hkdigital/lib-sveltekit 0.1.14 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/buttons/button-icon-steeze/SteezeIconButton.svelte +4 -4
- package/dist/components/buttons/button-icon-steeze/SteezeIconButton.svelte.d.ts +4 -4
- package/dist/components/icons/SteezeIcon.svelte +4 -4
- package/dist/components/icons/SteezeIcon.svelte.d.ts +2 -2
- package/package.json +1 -1
@@ -6,8 +6,8 @@
|
|
6
6
|
/**
|
7
7
|
* @type {{
|
8
8
|
* src: import('../../icons/typedef.js').IconSource,
|
9
|
-
*
|
10
|
-
*
|
9
|
+
* iconSize?: string,
|
10
|
+
* theme?: string,
|
11
11
|
* [key: string]: any
|
12
12
|
* }}
|
13
13
|
*/
|
@@ -15,7 +15,7 @@
|
|
15
15
|
// Icon
|
16
16
|
src,
|
17
17
|
iconSize,
|
18
|
-
|
18
|
+
theme,
|
19
19
|
|
20
20
|
// Snippets
|
21
21
|
children,
|
@@ -26,5 +26,5 @@
|
|
26
26
|
</script>
|
27
27
|
|
28
28
|
<Button type="icon-steeze" {...attrs}>
|
29
|
-
<SteezeIcon {src} size={iconSize} {
|
29
|
+
<SteezeIcon {src} size={iconSize} {theme} />
|
30
30
|
</Button>
|
@@ -4,13 +4,13 @@ type SteezeIconButton = {
|
|
4
4
|
$set?(props: Partial<{
|
5
5
|
[key: string]: any;
|
6
6
|
src: IconSource;
|
7
|
-
|
8
|
-
|
7
|
+
iconSize?: string;
|
8
|
+
theme?: string;
|
9
9
|
}>): void;
|
10
10
|
};
|
11
11
|
declare const SteezeIconButton: import("svelte").Component<{
|
12
12
|
[key: string]: any;
|
13
13
|
src: import("../../icons/typedef.js").IconSource;
|
14
|
-
|
15
|
-
|
14
|
+
iconSize?: string;
|
15
|
+
theme?: string;
|
16
16
|
}, {}, "">;
|
@@ -20,12 +20,12 @@
|
|
20
20
|
* ----------
|
21
21
|
* src - icon component
|
22
22
|
* size - width and height of the icon as percentage (..%) or in pixels
|
23
|
-
*
|
23
|
+
* theme - name of the icon theme (e.g. 'solid' or 'outline')
|
24
24
|
*
|
25
25
|
* @type {{
|
26
26
|
* src: import('./typedef.js').IconSource,
|
27
27
|
* size?: string,
|
28
|
-
*
|
28
|
+
* theme?: string,
|
29
29
|
* base?: string,
|
30
30
|
* classes?: string
|
31
31
|
* } & { [attr: string]: any }}
|
@@ -40,7 +40,7 @@
|
|
40
40
|
|
41
41
|
// Functional
|
42
42
|
src,
|
43
|
-
|
43
|
+
theme = 'default', // icon theme 'default'|'solid'|'outline'...
|
44
44
|
|
45
45
|
// States
|
46
46
|
// ...
|
@@ -53,7 +53,7 @@
|
|
53
53
|
let icon = $state();
|
54
54
|
|
55
55
|
$effect(() => {
|
56
|
-
icon = src?.[
|
56
|
+
icon = src?.[theme] ?? src?.['default'] ?? Object.values(src)?.[0];
|
57
57
|
});
|
58
58
|
|
59
59
|
// if (size !== '100%') {
|
@@ -4,7 +4,7 @@ type SteezeIcon = {
|
|
4
4
|
$set?(props: Partial<{
|
5
5
|
src: IconSource;
|
6
6
|
size?: string;
|
7
|
-
|
7
|
+
theme?: string;
|
8
8
|
base?: string;
|
9
9
|
classes?: string;
|
10
10
|
} & {
|
@@ -14,7 +14,7 @@ type SteezeIcon = {
|
|
14
14
|
declare const SteezeIcon: import("svelte").Component<{
|
15
15
|
src: import("./typedef.js").IconSource;
|
16
16
|
size?: string;
|
17
|
-
|
17
|
+
theme?: string;
|
18
18
|
base?: string;
|
19
19
|
classes?: string;
|
20
20
|
} & {
|