0.2.0 • Published 5 years ago

react-stackblitz-snippet v0.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

react-stackblitz-snippet

React Component to generate a Stackblitz Editor

Installation

yarn add react-stackblitz-snippet

or

npm i react-stackblitz-snippet --save

Usage

  1. import:
import { Stackblitz } from 'react-stackblitz-snippet';
  1. Use:
<Stackblitz>
  <file name="index.html" content="<h1>Hello</h1>" />
  <file name="index.ts" open>console.log("hello stackblitz!!");</file>
</Stackblitz>

Options

The file children can be used to easily add snippet code (see Usage). The open flag defines which file will be opened by default.

Demo

Open Demo in Stackblitz or clone the repo and run npm start!

0.2.0

5 years ago

0.1.0

5 years ago