55 href =" https://github.com/vue-styleguidist/vue-live/tree/master/demo"
66 >Check out the source for this demo</a >
77 <h2 >With imported components</h2 >
8- <VueLive :code =" codeTemplate" :layout =" CustomLayout" :components =" registeredComponents" />
8+ <VueLive :code =" codeTemplate" :layout =" CustomLayout" :components =" registeredComponents" />
99 <h2 >Display Single File Components</h2 >
10- <VueLive :code =" codeSfc" :layout =" CustomLayout" />
10+ <VueLive :code =" codeSfc" :layout =" CustomLayout" />
1111 <h2 >Pure JavaScript code</h2 >
12- <VueLive :code =" codeJs" :layout =" CustomLayout" />
12+ <VueLive :code =" codeJs" :layout =" CustomLayout" />
1313 <h2 >Use the requires prop to make libraries and packages available in the browser</h2 >
14- <VueLive :code =" codeChicago" :layout =" CustomLayout" :requires =" chicagoRequires" />
14+ <VueLive :code =" codeChicago" :layout =" CustomLayout" :requires =" chicagoRequires" />
1515 <h2 >With a custom update delay of 2 seconds</h2 >
1616 <VueLive
1717 :code =" `<input type='button' value='update me' />`"
2020 />
2121 <h2 >Default Layout</h2 >
2222 <div style =" width :950px ; max-width :95vw ; margin :20px auto ;" >
23- <VueLive :code =" `<input type='button' value='I am Groot' />`" />
23+ <VueLive :code =" `<input type='button' value='I am Groot' />`" />
2424 </div >
2525 <h2 >Custom Layout</h2 >
2626 <div >
27- <p >Attributes available for custom layout: <code >code: String</code >, <code >language: String</code ></p >
28- <VueLive :code =" `<input type='button' value='I am Groot' />`" :layout =" CustomLayout" />
27+ <p >
28+ Attributes available for custom layout:
29+ <code >code: String</code >,
30+ <code >language: String</code >
31+ </p >
32+ <VueLive :code =" `<input type='button' value='I am Groot' />`" :layout =" CustomLayout" />
2933 </div >
30- <link href =" https://fonts.googleapis.com/css?family=Roboto+Mono" rel =" stylesheet" >
34+ <h2 >It even supports jsx</h2 >
35+ <VueLive :code =" realjsx" :layout =" CustomLayout" :jsx =" true" />
36+ <link href =" https://fonts.googleapis.com/css?family=Roboto+Mono" rel =" stylesheet" />
3137 </main >
3238</template >
3339<script >
@@ -36,6 +42,7 @@ import CustomLayout from "./CustomLayout";
3642import DatePicker from " vuejs-datepicker" ;
3743import codeSfc from " !!raw-loader!./assets/Button.vue" ;
3844import codeJs from " !!raw-loader!./assets/input.js" ;
45+ import realjsx from " !!raw-loader!./assets/real.jsx" ;
3946import codeTemplate from " !!raw-loader!./assets/PureTemplate.html" ;
4047import codeChicago from " !!raw-loader!./assets/Chicago.jsx" ;
4148import all from " ./assets/chicagoNeighbourhoods" ;
@@ -54,7 +61,8 @@ export default {
5461 codeJs,
5562 codeChicago,
5663 CustomLayout,
57- chicagoRequires: { " ./chicagoNeighbourhoods" : all }
64+ chicagoRequires: { " ./chicagoNeighbourhoods" : all },
65+ realjsx
5866 };
5967 }
6068};
0 commit comments