diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index d4a2d74c9..b9a72f377 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,21 +1,5 @@ ## What kind of change does this pull request introduce? - - -## What is the current behavior? - - - -## What is the new behavior? - - - -## What steps did you take to test this? This is required before we can merge, make sure to test the flow you've updated. - -1. Step A -2. Step B -3. Step C - ## Checklist @@ -27,6 +11,5 @@ - [ ] Tests; - [ ] Ready to be merged; - diff --git a/website/docs/package.json b/website/docs/package.json index 3cffa4c3d..86b7f092d 100644 --- a/website/docs/package.json +++ b/website/docs/package.json @@ -12,7 +12,7 @@ "test-docs": "alex pages/**/" }, "dependencies": { - "@codesandbox/sandpack-react": "^2.0.1", + "@codesandbox/sandpack-react": "^2.18.0", "@codesandbox/sandpack-themes": "^2.0.1", "@radix-ui/react-tabs": "^1.0.1", "amplitude-js": "^8.13.0", diff --git a/website/docs/src/components/CodeBlock.tsx b/website/docs/src/components/CodeBlock.tsx index a84defda1..6d6be9fec 100644 --- a/website/docs/src/components/CodeBlock.tsx +++ b/website/docs/src/components/CodeBlock.tsx @@ -7,6 +7,7 @@ import { SandpackProvider, useSandpack, } from "@codesandbox/sandpack-react"; +import type { SandpackOptions } from "@codesandbox/sandpack-react"; import { sandpackDark } from "@codesandbox/sandpack-themes"; import { useTheme } from "next-themes"; import { useEffect, useState } from "react"; @@ -31,11 +32,11 @@ const ListenerResize: React.FC<{ onResize: (height: number) => void }> = ({ return null; }; -export const CodeBlock: React.FC<{ children: string; stack: boolean }> = ({ - children, - stack, - ...props -}) => { +export const CodeBlock: React.FC<{ + children: string; + stack: boolean; + options?: SandpackOptions; +}> = ({ children, stack, ...props }) => { const { theme } = useTheme(); const [height, setHeight] = useState(150); @@ -54,7 +55,7 @@ export const CodeBlock: React.FC<{ children: string; stack: boolean }> = ({ const sandpackProps = { customSetup: { dependencies: { - "@codesandbox/sandpack-react": "latest", + "@codesandbox/sandpack-react": "2.18.0", "@codesandbox/sandpack-themes": "latest", }, }, @@ -63,7 +64,7 @@ export const CodeBlock: React.FC<{ children: string; stack: boolean }> = ({ }, template: "react" as const, theme: getTheme(), - options: { showLineNumbers: true, initMode: "immediate" }, + options: { showLineNumbers: true, initMode: "immediate", ...props.options }, key: children, ...props, } as any;