Skip to content

Commit

Permalink
Ensure gallery share button is positioned correctly (#9881)
Browse files Browse the repository at this point in the history
* move gallery share button

* add changeset

---------

Co-authored-by: gradio-pr-bot <[email protected]>
  • Loading branch information
hannahblair and gradio-pr-bot authored Nov 1, 2024
1 parent dbc62fc commit 6866a54
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
6 changes: 6 additions & 0 deletions .changeset/slick-crabs-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@gradio/gallery": patch
"gradio": patch
---

fix:Ensure gallery share button is positioned correctly
25 changes: 11 additions & 14 deletions js/gallery/shared/Gallery.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,17 @@
on:click={toggle_full_screen}
/>
{/if}

{#if show_share_button}
<div class="icon-button">
<ShareButton
{i18n}
on:share
on:error
value={resolved_value}
formatter={format_gallery_for_sharing}
/>
</div>
{/if}
{#if !is_full_screen}
<IconButton
Icon={Clear}
Expand Down Expand Up @@ -388,19 +398,6 @@
<ModifyUpload {i18n} on:clear={() => (value = [])} />
</div>
{/if}
<IconButtonWrapper>
{#if show_share_button}
<div class="icon-button">
<ShareButton
{i18n}
on:share
on:error
value={resolved_value}
formatter={format_gallery_for_sharing}
/>
</div>
{/if}
</IconButtonWrapper>
{#each resolved_value as entry, i}
<button
class="thumbnail-item thumbnail-lg"
Expand Down

0 comments on commit 6866a54

Please sign in to comment.