@studiometa/playground-preview 0.3.13 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,21 +44,21 @@ For longer code snippets, use `<script>` elements with custom `type` attributes.
|
|
|
44
44
|
```html
|
|
45
45
|
<playground-preview height="80vh" theme="dark">
|
|
46
46
|
<script type="playground/html">
|
|
47
|
-
<div class="flex items-center gap-4">
|
|
47
|
+
<div class="flex items-center gap-4" data-component="App">
|
|
48
48
|
<h1>Hello World</h1>
|
|
49
49
|
<p>Some longer content here...</p>
|
|
50
50
|
</div>
|
|
51
51
|
</script>
|
|
52
52
|
|
|
53
53
|
<script type="playground/script">
|
|
54
|
-
import { Base,
|
|
54
|
+
import { Base, registerComponent } from '@studiometa/js-toolkit';
|
|
55
55
|
|
|
56
56
|
class App extends Base {
|
|
57
57
|
static config = { name: 'App' };
|
|
58
58
|
mounted() { console.log('mounted!'); }
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
registerComponent(App);
|
|
62
62
|
</script>
|
|
63
63
|
|
|
64
64
|
<script type="playground/css">
|