mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-18 10:44:33 +08:00
Allow updating the label of gr.UpdateButton
(#5280)
* upload button label * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
parent
502f1015bf
commit
a2f42e28bd
5
.changeset/eight-things-travel.md
Normal file
5
.changeset/eight-things-travel.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"gradio": minor
|
||||
---
|
||||
|
||||
feat:Allow updating the label of `gr.UpdateButton`
|
@ -109,6 +109,7 @@ class UploadButton(Clickable, Uploadable, IOComponent, FileSerializable):
|
||||
| list[str]
|
||||
| Literal[_Keywords.NO_VALUE]
|
||||
| None = _Keywords.NO_VALUE,
|
||||
label: str | None = None,
|
||||
size: Literal["sm", "lg"] | None = None,
|
||||
variant: Literal["primary", "secondary", "stop"] | None = None,
|
||||
interactive: bool | None = None,
|
||||
@ -124,6 +125,7 @@ class UploadButton(Clickable, Uploadable, IOComponent, FileSerializable):
|
||||
"value": value,
|
||||
"scale": scale,
|
||||
"min_width": min_width,
|
||||
"label": label,
|
||||
"__type__": "update",
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user