From 85da0a571c0503d31fc055801952ead043fffa09 Mon Sep 17 00:00:00 2001 From: Danilo Woznica Date: Thu, 21 Apr 2022 10:07:18 +0100 Subject: [PATCH] add log level on preset --- sandpack-react/src/Playground.stories.tsx | 9 +-------- sandpack-react/src/presets/Sandpack.tsx | 3 +++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/sandpack-react/src/Playground.stories.tsx b/sandpack-react/src/Playground.stories.tsx index 86cb7ec51..a8bfc2639 100644 --- a/sandpack-react/src/Playground.stories.tsx +++ b/sandpack-react/src/Playground.stories.tsx @@ -5,12 +5,5 @@ export default { }; export const Main = (): JSX.Element => { - return ( - - ); + return ; }; diff --git a/sandpack-react/src/presets/Sandpack.tsx b/sandpack-react/src/presets/Sandpack.tsx index 3bd6743d9..83a627791 100644 --- a/sandpack-react/src/presets/Sandpack.tsx +++ b/sandpack-react/src/presets/Sandpack.tsx @@ -1,4 +1,5 @@ import { ClasserProvider } from "@code-hike/classer"; +import type { SandpackLogLevel } from "@codesandbox/sandpack-client"; import * as React from "react"; import { SandpackLayout } from "../common/Layout"; @@ -69,6 +70,7 @@ export interface SandpackProps { * appears when `readOnly` is `true` */ showReadOnly?: boolean; + logLevel?: SandpackLogLevel; }; } @@ -118,6 +120,7 @@ export const Sandpack: React.FC = (props) => { initMode: props.options?.initMode, initModeObserverOptions: props.options?.initModeObserverOptions, externalResources: props.options?.externalResources, + logLevel: props.options?.logLevel, }; // Parts are set as `flex` values, so they set the flex shrink/grow