about summary refs log tree commit diff
path: root/bskyembed/src/container.tsx
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2024-04-13 03:58:40 +0100
committerGitHub <noreply@github.com>2024-04-13 03:58:40 +0100
commit4b3ec5573241b9c71504dfd0bd5f181cbde19a49 (patch)
tree698c2463b389cdf6e14536610e8f96f200ddaaa3 /bskyembed/src/container.tsx
parent8e29b1f63309ef9ac2da21f62e03b66d477244e9 (diff)
downloadvoidsky-4b3ec5573241b9c71504dfd0bd5f181cbde19a49.tar.zst
[Embeds] Embed subdomain landing page (#3501)
* add build output to web build

* simplify post-build step by copying everything at once

* make script that converts placeholder -> iframe

* dynamically resize iframe based on inner content

Requires the iframe content to `postMessage` its height back up to the parent

* add lang to embed

* svg explicit height -> viewBox

* add build output to web build

* simplify post-build step by copying everything at once

* attempt to fix go embed issue

* rm changes to bskyweb

* remove another bskyweb change

* embed landing page

* Drop xl breakpoint, too far down

* Remove pointer enter behavior

* Avoid button width jump

* Escape HTML

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
Diffstat (limited to 'bskyembed/src/container.tsx')
-rw-r--r--bskyembed/src/container.tsx32
1 files changed, 0 insertions, 32 deletions
diff --git a/bskyembed/src/container.tsx b/bskyembed/src/container.tsx
deleted file mode 100644
index 0d120e1b7..000000000
--- a/bskyembed/src/container.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-import {ComponentChildren, h} from 'preact'
-import {useRef} from 'preact/hooks'
-
-import {Link} from './link'
-
-export function Container({
-  children,
-  href,
-}: {
-  children: ComponentChildren
-  href: string
-}) {
-  const ref = useRef<HTMLDivElement>(null)
-  return (
-    <div
-      ref={ref}
-      className="w-full bg-white hover:bg-neutral-50 relative transition-colors max-w-[550px] min-w-[300px] flex border rounded-xl px-4 pt-3 pb-2.5"
-      onClick={() => {
-        if (ref.current) {
-          // forwardRef requires preact/compat - let's keep it simple
-          // to keep the bundle size down
-          const anchor = ref.current.querySelector('a')
-          if (anchor) {
-            anchor.click()
-          }
-        }
-      }}>
-      <Link href={href} />
-      {children}
-    </div>
-  )
-}