Skip to content

Commit 083bcf6

Browse files
author
Ives van Hoorne
committed
Make openInSandbox an option
1 parent d1ada6c commit 083bcf6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/sandpack/src/manager/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ export interface ISandboxInfo {
5757
* @type {string}
5858
*/
5959
template?: string;
60+
61+
showOpenInCodeSandbox?: boolean;
6062
}
6163

6264
const BUNDLER_URL =
@@ -170,7 +172,10 @@ export default class PreviewManager {
170172
template:
171173
this.sandboxInfo.template ||
172174
getTemplate(packageJSON, normalizedModules),
173-
showOpenInCodeSandbox: true,
175+
showOpenInCodeSandbox:
176+
this.sandboxInfo.showOpenInCodeSandbox == null
177+
? true
178+
: this.sandboxInfo.showOpenInCodeSandbox,
174179
skipEval: this.options.skipEval || false,
175180
});
176181
}

0 commit comments

Comments
 (0)