File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ # Hedgehog Lab package
2+
3+ This package provides a simple way to run Hedgehog editor in your application.
4+
5+ ## Installation
6+
7+ ``` bash
8+ yarn install @hedgehogcomputing/lab
9+ # or
10+ npm install @hedgehogcomputing/lab
11+ ```
12+
13+ ## Usage
14+
15+ ``` jsx
16+ import HedgehogLab from " @hedgehogcomputing/lab/src/HedgehogLab" ;
17+
18+ const Draft = () => {
19+ const yourSource = " any string"
20+ return (
21+ <>
22+ < HedgehogLab source= {yourSource} defaultFullScreen= {false } defaultLiveMode= {true }/ >
23+ < HedgehogLab userSnippet= {" @username/snippet" } defaultFullScreen= {false } defaultLiveMode= {true }/ >
24+ < / >
25+ )
26+ }
27+ ```
28+
29+ ## API
30+ ` <HedgehogLab /> ` accepts the following props:
31+
32+ -- alternative
33+ * source: ` string ` - the source code to be displayed in the editor
34+ * userSnippet : ` string ` - the user snippet to be displayed in the editor, example: "@username/snippet "
35+
36+ -- common
37+ * defaultFullScreen: ` boolean ` - whether the editor should be displayed in full screen mode by default
38+ * defaultLiveMode: ` boolean ` - whether the compiler should be auto-reload in live mode by default
You can’t perform that action at this time.
0 commit comments