@remy/jsconsole provides an interactive JavaScript console. This fork provides reusable React components with scoped CSS.
If you simply want to use an interactive JavaScript console, see jsconsole.com
Install this package:
npm install @alichry/jsconsole
And in your React application, simply import and include the root component:
import { Root } from '@alichry/jsconsole';
function App() {
return (
<div>
<YourComponents />
<Root />
</div>
);
}
export default App;
The Root
component defines the below configurable options:
defaultTheme
: Choose betweenlight
ordark
. Defaults tolight
environment
: Specify an execution environment, defaults toiframe
. Passtop-level
to avoid execution of JavaScript code inside an iframe.className
: Specify a CSS class name for the parent container.
<Root theme="dark" />
<Root environment="top-level" />