/** @jsxRuntime automatic */ import { Element } from "hast"; import { GetPictureResult } from "@astrojs/image/dist/lib/get-picture"; import { fromHtml } from "hast-util-from-html"; import fs from "fs/promises"; const launch = await fs.readFile("src/icons/launch.svg", "utf8"); const play = await fs.readFile("src/icons/play.svg", "utf8"); export interface IFramePlaceholderProps { width: string; height: string; src: string; pageTitle: string; pageIcon: GetPictureResult; } /** @jsxImportSource hastscript */ export function IFramePlaceholder({ height, width, ...props }: IFramePlaceholderProps): Element { return (
{props.pageIcon.sources.map((source) => ( ))}

An embedded webpage: {props.pageTitle}

{props.src}
{fromHtml(launch)}
New tab
) as never; }