mirror of
https://github.com/gradio-app/gradio.git
synced 2025-04-12 12:40:29 +08:00
Make buttons in gr.ChatInterface
more mobile-friendly (#7869)
* make buttons in chat interface more mobile friendly * add changeset * add changeset * lint --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
parent
d95a1a44d6
commit
b9dbcf7aa2
5
.changeset/shaggy-symbols-tie.md
Normal file
5
.changeset/shaggy-symbols-tie.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"gradio": patch
|
||||
---
|
||||
|
||||
feat:Make buttons in `gr.ChatInterface` more mobile-friendly
|
@ -193,7 +193,9 @@ class ChatInterface(Blocks):
|
||||
if isinstance(btn, Button):
|
||||
btn.render()
|
||||
elif isinstance(btn, str):
|
||||
btn = Button(btn, variant="secondary", size="sm")
|
||||
btn = Button(
|
||||
btn, variant="secondary", size="sm", min_width=60
|
||||
)
|
||||
else:
|
||||
raise ValueError(
|
||||
f"All the _btn parameters must be a gr.Button, string, or None, not {type(btn)}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user