File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
packages/docs-md/assets/TryItNow Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 88} from "@codesandbox/sandpack-react" ;
99import { useAtomValue } from "jotai" ;
1010
11+ import { CodeEditor } from "./CodeEditor/index.tsx" ;
1112import { dependenciesAtom , lastEditorValueAtom } from "./state/index.ts" ;
1213import { styles } from "./styles.ts" ;
1314
@@ -33,11 +34,15 @@ type TryItNowProps = {
3334 _enableUnsafeAutoImport ?: boolean ;
3435} ;
3536
36- const TryItNowContents = ( ) => {
37+ const TryItNowContents = ( {
38+ _enableUnsafeAutoImport,
39+ } : {
40+ _enableUnsafeAutoImport ?: boolean ;
41+ } ) => {
3742 const error = useErrorMessage ( ) ;
3843 return (
3944 < SandpackLayout >
40- < SandpackCodeEditor />
45+ { _enableUnsafeAutoImport ? < CodeEditor /> : < SandpackCodeEditor /> }
4146 { ! error && (
4247 < SandpackConsole
4348 resetOnPreviewRestart
You can’t perform that action at this time.
0 commit comments