@onsvisual/svelte-components 0.1.55 → 0.1.56
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.
|
@@ -9,7 +9,7 @@ export default class Button extends SvelteComponentTyped<{
|
|
|
9
9
|
icon?: string;
|
|
10
10
|
iconPosition?: "before" | "after";
|
|
11
11
|
disabled?: boolean;
|
|
12
|
-
|
|
12
|
+
hideLabel?: boolean;
|
|
13
13
|
}, {
|
|
14
14
|
click: CustomEvent<any>;
|
|
15
15
|
} & {
|
|
@@ -32,7 +32,7 @@ declare const __propDef: {
|
|
|
32
32
|
icon?: string;
|
|
33
33
|
iconPosition?: "before" | "after";
|
|
34
34
|
disabled?: boolean;
|
|
35
|
-
|
|
35
|
+
hideLabel?: boolean;
|
|
36
36
|
};
|
|
37
37
|
events: {
|
|
38
38
|
click: CustomEvent<any>;
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
* Visually hide the button text (for icon-only buttons)
|
|
44
44
|
* @type {boolean}
|
|
45
45
|
*/
|
|
46
|
-
export let
|
|
46
|
+
export let hideLabel = false;
|
|
47
47
|
</script>
|
|
48
48
|
|
|
49
49
|
{#if href}
|
|
@@ -62,15 +62,15 @@
|
|
|
62
62
|
{#if iconPosition === "before"}
|
|
63
63
|
<slot name="icon">
|
|
64
64
|
{#if icon}
|
|
65
|
-
<Icon type="{icon}" marginRight="{!
|
|
65
|
+
<Icon type="{icon}" marginRight="{!hideLabel}" />
|
|
66
66
|
{/if}
|
|
67
67
|
</slot>
|
|
68
68
|
{/if}
|
|
69
|
-
<span class="ons-btn__text" class:ons-u-vh="{
|
|
69
|
+
<span class="ons-btn__text" class:ons-u-vh="{hideLabel}"><slot /></span>
|
|
70
70
|
{#if iconPosition === "after"}
|
|
71
71
|
<slot name="icon">
|
|
72
72
|
{#if icon}
|
|
73
|
-
<Icon type="{icon}" marginLeft="{!
|
|
73
|
+
<Icon type="{icon}" marginLeft="{!hideLabel}" />
|
|
74
74
|
{/if}
|
|
75
75
|
</slot>
|
|
76
76
|
{/if}
|
|
@@ -91,15 +91,15 @@
|
|
|
91
91
|
{#if iconPosition === "before"}
|
|
92
92
|
<slot name="icon">
|
|
93
93
|
{#if icon}
|
|
94
|
-
<Icon type="{icon}" marginRight="{!
|
|
94
|
+
<Icon type="{icon}" marginRight="{!hideLabel}" />
|
|
95
95
|
{/if}
|
|
96
96
|
</slot>
|
|
97
97
|
{/if}
|
|
98
|
-
<span class="ons-btn__text" class:ons-u-vh="{
|
|
98
|
+
<span class="ons-btn__text" class:ons-u-vh="{hideLabel}"><slot /></span>
|
|
99
99
|
{#if iconPosition === "after"}
|
|
100
100
|
<slot name="icon">
|
|
101
101
|
{#if icon}
|
|
102
|
-
<Icon type="{icon}" marginLeft="{!
|
|
102
|
+
<Icon type="{icon}" marginLeft="{!hideLabel}" />
|
|
103
103
|
{/if}
|
|
104
104
|
</slot>
|
|
105
105
|
{/if}
|