File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export const withContextWrapper = makeDecorator({
8
8
name : "withContextWrapper" ,
9
9
parameterName : "context" ,
10
10
wrapper : ( StoryFn , context ) => {
11
- const { args, argTypes, viewMode } = context ;
11
+ const { args, argTypes, id , viewMode } = context ;
12
12
13
13
const getDefaultValue = ( type ) => {
14
14
if ( ! type ) return null ;
@@ -31,7 +31,13 @@ export const withContextWrapper = makeDecorator({
31
31
const scales = [ "medium" , "large" ] ;
32
32
33
33
useEffect ( ( ) => {
34
- const container = viewMode === "docs" && ! window . isChromatic ( ) ? document . querySelector ( '#root-inner' ) ?? document . body : document . body ;
34
+ const container =
35
+ viewMode === "docs" &&
36
+ ! window . isChromatic ( ) &&
37
+ ! id . includes ( 'foundation' )
38
+ ? document . querySelector ( '#root-inner' ) ?? document . body
39
+ : document . body ;
40
+
35
41
container . classList . toggle ( "spectrum" , true ) ;
36
42
37
43
container . classList . toggle ( "spectrum--express" , isExpress ) ;
You can’t perform that action at this time.
0 commit comments