From b10ae600dc9fee9203cb37363ac40021e30105c2 Mon Sep 17 00:00:00 2001 From: Danilo Woznica Date: Tue, 15 Feb 2022 16:18:59 +0000 Subject: [PATCH] sandpack: bring back init mode (#4337) * sandpack: bring back init mode * upgrade sandpack --- beta/package.json | 2 +- beta/src/components/MDX/Sandpack/index.tsx | 4 +++- beta/yarn.lock | 18 +++++++++--------- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/beta/package.json b/beta/package.json index 564b2036..89be6637 100644 --- a/beta/package.json +++ b/beta/package.json @@ -22,7 +22,7 @@ "check-all": "npm-run-all prettier lint:fix tsc" }, "dependencies": { - "@codesandbox/sandpack-react": "0.13.11-experimental.0", + "@codesandbox/sandpack-react": "0.13.16-experimental.0", "@docsearch/css": "3.0.0-alpha.41", "@docsearch/react": "3.0.0-alpha.41", "@headlessui/react": "^1.3.0", diff --git a/beta/src/components/MDX/Sandpack/index.tsx b/beta/src/components/MDX/Sandpack/index.tsx index cf95902a..b0e6cee4 100644 --- a/beta/src/components/MDX/Sandpack/index.tsx +++ b/beta/src/components/MDX/Sandpack/index.tsx @@ -127,7 +127,9 @@ function Sandpack(props: SandpackProps) { + autorun={autorun} + initMode="user-visible" + initModeObserverOptions={{rootMargin: '1400px 0px'}}>