@aliemir/react-live
Version:
A production-focused playground for live editing React code
19 lines (16 loc) • 439 B
JavaScript
import React, { useContext } from "react";
import LiveContext from "./LiveContext";
import Editor from "../Editor";
export default function LiveEditor({ Context = LiveContext, ...props }) {
const { code, language, theme, disabled, onChange } = useContext(Context);
return (
<Editor
theme={theme}
code={code}
language={language}
disabled={disabled}
onChange={onChange}
{...props}
/>
);
}