@gradio/button 0.3.0-beta.2 → 0.3.0-beta.3
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/Button.stories.svelte +12 -0
- package/CHANGELOG.md +11 -0
- package/dist/shared/Button.svelte +8 -1
- package/package.json +4 -4
- package/shared/Button.svelte +8 -1
package/Button.stories.svelte
CHANGED
@@ -78,6 +78,18 @@
|
|
78
78
|
}
|
79
79
|
}}
|
80
80
|
/>
|
81
|
+
<Story
|
82
|
+
name="Button with external image icon and no text"
|
83
|
+
args={{
|
84
|
+
interactive: true,
|
85
|
+
icon: {
|
86
|
+
url: "https://huggingface.co/front/assets/huggingface_logo-noborder.svg",
|
87
|
+
path: "https://huggingface.co/front/assets/huggingface_logo-noborder.svg"
|
88
|
+
},
|
89
|
+
value: ""
|
90
|
+
}}
|
91
|
+
/>
|
92
|
+
|
81
93
|
<Story
|
82
94
|
name="Button with visible equal to false"
|
83
95
|
args={{
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# @gradio/button
|
2
2
|
|
3
|
+
## 0.3.0-beta.3
|
4
|
+
|
5
|
+
### Fixes
|
6
|
+
|
7
|
+
- [#9405](https://github.com/gradio-app/gradio/pull/9405) [`bf27ff4`](https://github.com/gradio-app/gradio/commit/bf27ff4ac8ada33ea03dd26d5c1c1115aa1f318a) - Center icon in button when no text is present. Thanks @abidlabs!
|
8
|
+
|
9
|
+
### Dependency updates
|
10
|
+
|
11
|
+
- @gradio/upload@0.13.0-beta.3
|
12
|
+
- @gradio/client@1.6.0-beta.3
|
13
|
+
|
3
14
|
## 0.3.0-beta.2
|
4
15
|
|
5
16
|
### Dependency updates
|
@@ -47,7 +47,12 @@ export let min_width = void 0;
|
|
47
47
|
{disabled}
|
48
48
|
>
|
49
49
|
{#if icon}
|
50
|
-
<img
|
50
|
+
<img
|
51
|
+
class="button-icon"
|
52
|
+
class:right-padded={value}
|
53
|
+
src={icon.url}
|
54
|
+
alt={`${value} icon`}
|
55
|
+
/>
|
51
56
|
{/if}
|
52
57
|
<slot />
|
53
58
|
</button>
|
@@ -174,6 +179,8 @@ export let min_width = void 0;
|
|
174
179
|
.button-icon {
|
175
180
|
width: var(--text-xl);
|
176
181
|
height: var(--text-xl);
|
182
|
+
}
|
183
|
+
.button-icon.right-padded {
|
177
184
|
margin-right: var(--spacing-xl);
|
178
185
|
}
|
179
186
|
</style>
|
package/package.json
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
{
|
2
2
|
"name": "@gradio/button",
|
3
|
-
"version": "0.3.0-beta.
|
3
|
+
"version": "0.3.0-beta.3",
|
4
4
|
"description": "Gradio UI packages",
|
5
5
|
"type": "module",
|
6
6
|
"author": "",
|
7
7
|
"license": "ISC",
|
8
8
|
"private": false,
|
9
9
|
"dependencies": {
|
10
|
-
"@gradio/client": "^1.6.0-beta.
|
11
|
-
"@gradio/
|
12
|
-
"@gradio/
|
10
|
+
"@gradio/client": "^1.6.0-beta.3",
|
11
|
+
"@gradio/upload": "^0.13.0-beta.3",
|
12
|
+
"@gradio/utils": "^0.7.0-beta.2"
|
13
13
|
},
|
14
14
|
"devDependencies": {
|
15
15
|
"@gradio/preview": "^0.11.1"
|
package/shared/Button.svelte
CHANGED
@@ -50,7 +50,12 @@
|
|
50
50
|
{disabled}
|
51
51
|
>
|
52
52
|
{#if icon}
|
53
|
-
<img
|
53
|
+
<img
|
54
|
+
class="button-icon"
|
55
|
+
class:right-padded={value}
|
56
|
+
src={icon.url}
|
57
|
+
alt={`${value} icon`}
|
58
|
+
/>
|
54
59
|
{/if}
|
55
60
|
<slot />
|
56
61
|
</button>
|
@@ -177,6 +182,8 @@
|
|
177
182
|
.button-icon {
|
178
183
|
width: var(--text-xl);
|
179
184
|
height: var(--text-xl);
|
185
|
+
}
|
186
|
+
.button-icon.right-padded {
|
180
187
|
margin-right: var(--spacing-xl);
|
181
188
|
}
|
182
189
|
</style>
|