Skip to content

Commit

Permalink
feat: move buttons higher (#18039)
Browse files Browse the repository at this point in the history
* feat: move buttons higher

* Update UI snapshots for `chromium` (2)

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
pauldambra and github-actions[bot] authored Oct 18, 2023
1 parent f930132 commit 2294b38
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 22 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/__snapshots__/components-sharing--insight-sharing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 23 additions & 22 deletions frontend/src/lib/components/Sharing/SharingModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,28 +121,6 @@ export function SharingModalContent({
</div>

<Form logic={sharingLogic} props={logicProps} formKey="embedConfig" className="space-y-2">
{previewIframe && (
<div className="rounded border">
<LemonButton
fullWidth
status="stealth"
sideIcon={showPreview ? <IconUnfoldLess /> : <IconUnfoldMore />}
onClick={togglePreview}
>
Preview
{showPreview && !iframeLoaded ? <Spinner className="ml-2" /> : null}
</LemonButton>
{showPreview && (
<div className="SharingPreview border-t">
<iframe
className="block"
{...iframeProperties}
onLoad={() => setIframeLoaded(true)}
/>
</div>
)}
</div>
)}
<Field name="whitelabel">
{({ value, onChange }) => (
<LemonSwitch
Expand Down Expand Up @@ -203,6 +181,29 @@ export function SharingModalContent({
)}
</Field>
)}

{previewIframe && (
<div className="rounded border">
<LemonButton
fullWidth
status="stealth"
sideIcon={showPreview ? <IconUnfoldLess /> : <IconUnfoldMore />}
onClick={togglePreview}
>
Preview
{showPreview && !iframeLoaded ? <Spinner className="ml-2" /> : null}
</LemonButton>
{showPreview && (
<div className="SharingPreview border-t">
<iframe
className="block"
{...iframeProperties}
onLoad={() => setIframeLoaded(true)}
/>
</div>
)}
</div>
)}
</Form>
</>
) : null}
Expand Down

0 comments on commit 2294b38

Please sign in to comment.