Skip to content

Commit

Permalink
fix(Preview): Resolve SplashScreen rendering behind content (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeltaranto committed Sep 14, 2020
1 parent 43e518e commit 2b605a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/Playroom/Preview.less
@@ -0,0 +1,4 @@
.container {
position: relative;
z-index: -1;
}
7 changes: 6 additions & 1 deletion src/Playroom/Preview.tsx
Expand Up @@ -5,6 +5,9 @@ import { useParams } from '../utils/params';
import { compileJsx } from '../utils/compileJsx';
import SplashScreen from './SplashScreen/SplashScreen';

// @ts-ignore
import styles from './Preview.less';

// @ts-ignore
import CatchErrors from './CatchErrors/CatchErrors';
// @ts-ignore
Expand Down Expand Up @@ -47,7 +50,9 @@ export default ({ themes, components, FrameComponent }: PreviewProps) => {
themeName={themeName || '__PLAYROOM__NO_THEME__'}
theme={resolvedTheme}
>
<RenderCode code={code} scope={components} />
<div className={styles.container}>
<RenderCode code={code} scope={components} />
</div>
<SplashScreen />
</FrameComponent>
</CatchErrors>
Expand Down

0 comments on commit 2b605a5

Please sign in to comment.