Skip to content

Commit 6866a54

Browse files
Ensure gallery share button is positioned correctly (#9881)
* move gallery share button * add changeset --------- Co-authored-by: gradio-pr-bot <[email protected]>
1 parent dbc62fc commit 6866a54

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

.changeset/slick-crabs-move.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@gradio/gallery": patch
3+
"gradio": patch
4+
---
5+
6+
fix:Ensure gallery share button is positioned correctly

js/gallery/shared/Gallery.svelte

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,17 @@
284284
on:click={toggle_full_screen}
285285
/>
286286
{/if}
287-
287+
{#if show_share_button}
288+
<div class="icon-button">
289+
<ShareButton
290+
{i18n}
291+
on:share
292+
on:error
293+
value={resolved_value}
294+
formatter={format_gallery_for_sharing}
295+
/>
296+
</div>
297+
{/if}
288298
{#if !is_full_screen}
289299
<IconButton
290300
Icon={Clear}
@@ -388,19 +398,6 @@
388398
<ModifyUpload {i18n} on:clear={() => (value = [])} />
389399
</div>
390400
{/if}
391-
<IconButtonWrapper>
392-
{#if show_share_button}
393-
<div class="icon-button">
394-
<ShareButton
395-
{i18n}
396-
on:share
397-
on:error
398-
value={resolved_value}
399-
formatter={format_gallery_for_sharing}
400-
/>
401-
</div>
402-
{/if}
403-
</IconButtonWrapper>
404401
{#each resolved_value as entry, i}
405402
<button
406403
class="thumbnail-item thumbnail-lg"

0 commit comments

Comments
 (0)