7
7
useSandpack ,
8
8
useActiveCode ,
9
9
SandpackCodeEditor ,
10
- // SandpackReactDevTools,
11
10
SandpackLayout ,
12
- } from '@codesandbox/sandpack-react' ;
11
+ } from '@codesandbox/sandpack-react/unstyled ' ;
13
12
import cn from 'classnames' ;
14
13
15
14
import { IconChevron } from 'components/Icon/IconChevron' ;
@@ -19,14 +18,8 @@ import {Preview} from './Preview';
19
18
import { useSandpackLint } from './useSandpackLint' ;
20
19
21
20
export const CustomPreset = memo ( function CustomPreset ( {
22
- showDevTools,
23
- onDevToolsLoad,
24
- devToolsLoaded,
25
21
providedFiles,
26
22
} : {
27
- showDevTools : boolean ;
28
- devToolsLoaded : boolean ;
29
- onDevToolsLoad : ( ) => void ;
30
23
providedFiles : Array < string > ;
31
24
} ) {
32
25
const { lintErrors, lintExtensions} = useSandpackLint ( ) ;
@@ -41,9 +34,6 @@ export const CustomPreset = memo(function CustomPreset({
41
34
const isExpandable = lineCount > 16 ;
42
35
return (
43
36
< SandboxShell
44
- showDevTools = { showDevTools }
45
- onDevToolsLoad = { onDevToolsLoad }
46
- devToolsLoaded = { devToolsLoaded }
47
37
providedFiles = { providedFiles }
48
38
lintErrors = { lintErrors }
49
39
lintExtensions = { lintExtensions }
@@ -53,16 +43,11 @@ export const CustomPreset = memo(function CustomPreset({
53
43
} ) ;
54
44
55
45
const SandboxShell = memo ( function SandboxShell ( {
56
- showDevTools,
57
- devToolsLoaded,
58
46
providedFiles,
59
47
lintErrors,
60
48
lintExtensions,
61
49
isExpandable,
62
50
} : {
63
- showDevTools : boolean ;
64
- devToolsLoaded : boolean ;
65
- onDevToolsLoad : ( ) => void ;
66
51
providedFiles : Array < string > ;
67
52
lintErrors : Array < any > ;
68
53
lintExtensions : Array < any > ;
@@ -81,7 +66,6 @@ const SandboxShell = memo(function SandboxShell({
81
66
< NavigationBar providedFiles = { providedFiles } />
82
67
< SandpackLayout
83
68
className = { cn (
84
- showDevTools && devToolsLoaded && 'sp-layout-devtools' ,
85
69
! ( isExpandable || isExpanded ) && 'rounded-b-lg overflow-hidden' ,
86
70
isExpanded && 'sp-layout-expanded'
87
71
) } >
@@ -123,11 +107,6 @@ const SandboxShell = memo(function SandboxShell({
123
107
</ button >
124
108
) }
125
109
</ SandpackLayout >
126
-
127
- { /* {showDevTools && (
128
- // @ts -ignore TODO(@danilowoz): support devtools
129
- <SandpackReactDevTools onLoadModule={onDevToolsLoad} />
130
- )} */ }
131
110
</ div >
132
111
</ >
133
112
) ;
0 commit comments