UNPKG

@codesandbox/sandpack-react

Version:

<img style="width:100%" src="https://user-images.githubusercontent.com/4838076/143581035-ebee5ba2-9cb1-4fe8-a05b-2f44bd69bb4b.gif" alt="Component toolkit for live running code editing experiences" />

27 lines (26 loc) 1.01 kB
import * as React from "react"; import type { SandpackConsoleData } from "./utils/getType"; interface SandpackConsoleProps { clientId?: string; showHeader?: boolean; showSyntaxError?: boolean; showSetupProgress?: boolean; showRestartButton?: boolean; showResetConsoleButton?: boolean; maxMessageCount?: number; onLogsChange?: (logs: SandpackConsoleData) => void; resetOnPreviewRestart?: boolean; standalone?: boolean; actionsChildren?: JSX.Element; } export interface SandpackConsoleRef { reset: () => void; } /** * `SandpackConsole` is a Sandpack devtool that allows printing * the console logs from a Sandpack client. It is designed to be * a light version of a browser console, which means that it's * limited to a set of common use cases you may encounter when coding. */ export declare const SandpackConsole: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & SandpackConsoleProps & React.RefAttributes<SandpackConsoleRef>>; export {};