1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-09-18 16:05:33 -04:00

move some non-post pages to mdx

This commit is contained in:
2025-03-07 11:53:23 -05:00
parent 8118b8501a
commit 354dade9aa
72 changed files with 811 additions and 1873 deletions

View File

@@ -0,0 +1,32 @@
export type CodePenProps = {
username: string;
id: string;
height?: number;
defaultTab?: string;
preview?: boolean;
editable?: boolean;
};
const CodePen = ({
username,
id,
height = 500,
defaultTab = "html",
preview = true,
editable = false,
}: CodePenProps) => {
return (
<iframe
src={`https://codepen.io/${username}/embed/${id}/?${new URLSearchParams({
"default-tab": `${defaultTab},result`,
preview: `${!!preview}`,
editable: `${!!editable}`,
})}`}
scrolling="no"
sandbox="allow-same-origin allow-scripts allow-popups allow-top-navigation-by-user-activation"
style={{ height: `${height}px`, width: "100%", border: "0" }}
/>
);
};
export default CodePen;

View File

@@ -0,0 +1,2 @@
export * from "./CodePen";
export { default } from "./CodePen";