React Component to generate a Stackblitz Editor
React Component to generate a Stackblitz Editor
yarn add react-stackblitz-snippet
or
npm i react-stackblitz-snippet --save
import { Stackblitz } from 'react-stackblitz-snippet';
<Stackblitz>
<file name="index.html" content="<h1>Hello</h1>" />
<file name="index.ts" open>console.log("hello stackblitz!!");</file>
</Stackblitz>
The file children can be used to easily add snippet code (see Usage). The open flag defines which file will be opened by default.
Open Demo in Stackblitz or clone the repo and run npm start
!