UNPKG

react-code-canvas

Version:

Package to run and preview React code with live editing capabilities in a browser.

14 lines (13 loc) 578 B
import React, { ReactNode } from 'react'; import { UseLiveRunnerProps } from './useLiveRunner'; import { Language, Theme } from './types'; export type LiveProviderProps = Omit<UseLiveRunnerProps, 'initialCode'> & { children?: ReactNode; /** initial code for the live runner */ code?: string; /** language for syntax highlighting */ language?: Language; /** `prism-react-renderer` theme object */ theme?: Theme; }; export declare const LiveProvider: ({ children, code: initialCode, language, theme, ...rest }: LiveProviderProps) => React.JSX.Element;