Skip to content

Commit

Permalink
add log level on preset
Browse files Browse the repository at this point in the history
  • Loading branch information
danilowoz committed Apr 21, 2022
1 parent 4e7e668 commit 85da0a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
9 changes: 1 addition & 8 deletions sandpack-react/src/Playground.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,5 @@ export default {
};

export const Main = (): JSX.Element => {
return (
<Sandpack
options={{
bundlerURL: "https://02079e92.sandpack-bundler.pages.dev/",
}}
template="solid-beta"
/>
);
return <Sandpack />;
};
3 changes: 3 additions & 0 deletions sandpack-react/src/presets/Sandpack.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -69,6 +70,7 @@ export interface SandpackProps {
* appears when `readOnly` is `true`
*/
showReadOnly?: boolean;
logLevel?: SandpackLogLevel;
};
}

Expand Down Expand Up @@ -118,6 +120,7 @@ export const Sandpack: React.FC<SandpackProps> = (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
Expand Down

0 comments on commit 85da0a5

Please sign in to comment.