File tree Expand file tree Collapse file tree 4 files changed +10
-4
lines changed
Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @gradio/textbox " : patch
3+ " gradio " : patch
4+ ---
5+
6+ fix: Fix copy button in ` gr.Textbox `
Original file line number Diff line number Diff line change 8282 placeholder ={gradio .props .placeholder }
8383 submit _btn={gradio .props .submit _btn}
8484 stop _btn={gradio .props .stop _btn}
85- show _copy_button ={gradio .props .show _copy_button }
85+ buttons ={gradio .props .buttons }
8686 autofocus ={gradio .props .autofocus }
8787 container ={gradio .shared .container }
8888 autoscroll ={gradio .shared .autoscroll }
Original file line number Diff line number Diff line change 2121 export let container = true ;
2222 export let max_lines: number | undefined = undefined ;
2323 export let type: " text" | " password" | " email" = " text" ;
24- export let show_copy_button = false ;
24+ export let buttons : string [] = [] ;
2525 export let submit_btn: string | boolean | null = null ;
2626 export let stop_btn: string | boolean | null = null ;
2727 export let rtl = false ;
243243
244244<!-- svelte-ignore a11y-autofocus -->
245245<label class:container class:show _textbox_border>
246- {#if show_label && show_copy_button }
246+ {#if show_label && buttons . includes ( " copy " ) }
247247 <IconButtonWrapper >
248248 <IconButton
249249 Icon ={copied ? Check : Copy }
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export interface TextboxProps {
2424 placeholder : string ;
2525 submit_btn : string ;
2626 stop_btn : string ;
27- show_copy_button : boolean ;
27+ buttons : string [ ] ;
2828 autofocus : boolean ;
2929 autoscroll : boolean ;
3030 max_length : number ;
You can’t perform that action at this time.
0 commit comments