|
1 | 1 | ---
|
2 | 2 | arbitrary: <% nameWithoutIon = name.replace('ion-', '') %>
|
3 |
| -# this template is only used if `css` (from the command line prompt) is false |
4 |
| -to: "<%= css ? null : `static/usage/v${version}/${nameWithoutIon}/${path}/index.md` %>" |
| 3 | +to: "<%= `static/usage/v${version}/${nameWithoutIon}/${path}/index.md` %>" |
5 | 4 | ---
|
6 | 5 | import Playground from '@site/src/components/global/Playground';
|
7 | 6 |
|
8 | 7 | import javascript from './javascript.md';
|
| 8 | +<% if (css){ %> |
| 9 | +import react_main_tsx from './react/main_tsx.md'; |
| 10 | +import react_main_css from './react/main_css.md'; |
| 11 | +
|
| 12 | +<% } else { -%> |
9 | 13 | import react from './react.md';
|
| 14 | +<% } -%> |
10 | 15 | import vue from './vue.md';
|
| 16 | +<% if (css || angular_ts){ %> |
| 17 | +import angular_example_component_html from './angular/example_component_html.md'; |
| 18 | +<% } else { -%> |
11 | 19 | import angular from './angular.md';
|
| 20 | +<% } -%> |
| 21 | +<% if (angular_ts){ -%> |
| 22 | +import angular_example_component_ts from './angular/example_component_ts.md'; |
| 23 | +<% } -%> |
| 24 | +<% if (css){ -%> |
| 25 | +import angular_example_component_css from './angular/example_component_css.md'; |
| 26 | +<% } -%> |
12 | 27 |
|
13 |
| -<Playground version="<%= version %>" code={{ javascript, react, vue, angular }} src="<%= `usage/v${version}/${nameWithoutIon}/${path}/demo.html` %>" /> |
| 28 | +<Playground |
| 29 | + version="<%= version %>" |
| 30 | + code={{ |
| 31 | + javascript, |
| 32 | +<% if (css){ -%> |
| 33 | + react: { |
| 34 | + files: { |
| 35 | + 'src/main.tsx': react_main_tsx, |
| 36 | + 'src/main.css': react_main_css, |
| 37 | + }, |
| 38 | + }, |
| 39 | +<% } else { -%> |
| 40 | + react, |
| 41 | +<% } -%> |
| 42 | + vue, |
| 43 | +<% if (angular_ts || css){ -%> |
| 44 | + angular: { |
| 45 | + files: { |
| 46 | + 'src/app/example.component.html': angular_example_component_html, |
| 47 | +<% if (angular_ts){ -%> |
| 48 | + 'src/app/example.component.ts': angular_example_component_ts, |
| 49 | +<% } -%> |
| 50 | +<% if (css){ -%> |
| 51 | + 'src/app/example.component.css': angular_example_component_css, |
| 52 | +<% } -%> |
| 53 | + }, |
| 54 | + }, |
| 55 | +<% } else { -%> |
| 56 | + angular, |
| 57 | +<% } -%> |
| 58 | + }} |
| 59 | + src="usage/v<%= version %>/<%= nameWithoutIon %>/<%= path %>/demo.html" |
| 60 | +/> |
0 commit comments