File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ Run the following command from the root of your project:
14
14
15
15
For now only ` vue ` (and core) is supported.
16
16
17
+ ### NativeScript + Vue
18
+
17
19
``` ts
18
20
import CanvasSVG from ' @nativescript-community/ui-svg/vue' ;
19
21
Vue .use (CanvasSVG );
@@ -47,10 +49,23 @@ Or within and Canvas View extending `CanvasView` like `CanvasLabel`
47
49
</CanvasSVG >
48
50
```
49
51
52
+ ### NativeScript + Svelte
53
+
54
+ ``` ts
55
+ // app/app.ts
56
+ import { registerNativeViewElement } from ' svelte-native/dom' ;
57
+ registerNativeViewElement (' svgView' , () => require (' @nativescript-community/ui-svg' ).SVGView );
58
+ ```
59
+
60
+ ``` svelte
61
+ <!-- app/components/Foo.svelte -->
62
+ <svgView src="~/assets/foo.svg" aspectFit="stretch" />
63
+ ```
64
+
50
65
### Examples:
51
66
52
67
- [ Basic] ( demo-snippets/vue/SVG.vue )
53
68
- A basic SVG example
54
69
55
70
{{ load:../../tools/readme/demos-and-development.md }}
56
- {{ load:../../tools/readme/questions.md }}
71
+ {{ load:../../tools/readme/questions.md }}
You can’t perform that action at this time.
0 commit comments