Files
outline/shared/editor/embeds/JSFiddle.tsx
T
Tom Moor bf45e97641 chore: Enforce type import consistency (#10968)
* Update types

* fix circular dep

* type imports

* lint type imports and --fix
2025-12-19 23:07:02 -05:00

24 lines
601 B
TypeScript

import * as React from "react";
import { useTheme } from "styled-components";
import Frame from "../components/Frame";
import type { EmbedProps as Props } from ".";
function JSFiddle({ matches, ...props }: Props) {
const normalizedUrl = props.attrs.href.replace(/(\/embedded)?\/$/, "");
const theme = useTheme();
return (
<Frame
{...props}
src={`${normalizedUrl}/embedded/result,js,css,html/${
theme.isDark ? "dark/" : ""
}`}
title="JSFiddle Embed"
referrerPolicy="strict-origin-when-cross-origin"
border
/>
);
}
export default JSFiddle;