@@ -926,7 +926,7 @@ export function openBottomSheet(args) {
926
926
927
927
##
928
928
929
- ### NativeScript + Vue
929
+ ### NativeScript + Vue 2
930
930
``` typescript
931
931
import Vue from ' nativescript-vue' ;
932
932
import BottomSheetPlugin from ' @nativescript-community/ui-material-bottomsheet/vue' ;
@@ -945,6 +945,32 @@ const options: VueBottomSheetOptions = {
945
945
this .$showBottomSheet (MyComponent , options )
946
946
```
947
947
948
+ ### NativeScript + Vue 3
949
+ ``` typescript
950
+ import { createApp } from ' nativescript-vue' ;
951
+ import { BottomSheetPlugin } from ' @nativescript-community/ui-material-bottomsheet/vue3' ;
952
+ import { install } from " @nativescript-community/ui-material-bottomsheet" ;
953
+ install ();
954
+
955
+ const app = createApp (... );
956
+ app .use (BottomSheetPlugin );
957
+ ```
958
+ Then you can show a Vue component:
959
+ ``` typescript
960
+ import { useBottomSheet } from " @nativescript-community/ui-material-bottomsheet/vue3" ;
961
+ import MyComponent from ' MyComponent.vue' ;
962
+
963
+
964
+ const options: VueBottomSheetOptions = {
965
+ ...
966
+ };
967
+
968
+ const { showBottomSheet, closeBottomSheet } = useBottomSheet ()
969
+
970
+ showBottomSheet (MyComponent , options );
971
+ closeBottomSheet ();
972
+ ```
973
+
948
974
##
949
975
950
976
### NativeScript + Angular
@@ -2811,4 +2837,101 @@ An attribute to set the helper text of the textview.
2811
2837
2812
2838
A boolean attribute to set the floating state of the textview.
2813
2839
2814
- </details >
2840
+ </details >
2841
+
2842
+ [ ] ( #demos-and-development )
2843
+
2844
+ ## Demos and Development
2845
+
2846
+
2847
+ ### Repo Setup
2848
+
2849
+ The repo uses submodules. If you did not clone with ` --recursive ` then you need to call
2850
+ ```
2851
+ git submodule update --init
2852
+ ```
2853
+
2854
+ The package manager used to install and link dependencies must be ` pnpm ` or ` yarn ` . ` npm ` wont work.
2855
+
2856
+ To develop and test:
2857
+ if you use ` yarn ` then run ` yarn `
2858
+ if you use ` pnpm ` then run ` pnpm i `
2859
+
2860
+ ** Interactive Menu:**
2861
+
2862
+ To start the interactive menu, run ` npm start ` (or ` yarn start ` or ` pnpm start ` ). This will list all of the commonly used scripts.
2863
+
2864
+ ### Build
2865
+
2866
+ ``` bash
2867
+ npm run build.all
2868
+ ```
2869
+ WARNING: it seems ` yarn build.all ` wont always work (not finding binaries in ` node_modules/.bin ` ) which is why the doc explicitly uses ` npm run `
2870
+
2871
+ ### Demos
2872
+
2873
+ ``` bash
2874
+ npm run demo.[ng| react| svelte| vue].[ios| android]
2875
+
2876
+ npm run demo.svelte.ios # Example
2877
+ ```
2878
+
2879
+ Demo setup is a bit special in the sense that if you want to modify/add demos you dont work directly in ` demo-[ng|react|svelte|vue] `
2880
+ Instead you work in ` demo-snippets/[ng|react|svelte|vue] `
2881
+ You can start from the ` install.ts ` of each flavor to see how to register new demos
2882
+
2883
+
2884
+ [ ] ( #contributing )
2885
+
2886
+ ## Contributing
2887
+
2888
+ ### Update repo
2889
+
2890
+ You can update the repo files quite easily
2891
+
2892
+ First update the submodules
2893
+
2894
+ ``` bash
2895
+ npm run update
2896
+ ```
2897
+
2898
+ Then commit the changes
2899
+ Then update common files
2900
+
2901
+ ``` bash
2902
+ npm run sync
2903
+ ```
2904
+ Then you can run ` yarn|pnpm ` , commit changed files if any
2905
+
2906
+ ### Update readme
2907
+ ``` bash
2908
+ npm run readme
2909
+ ```
2910
+
2911
+ ### Update doc
2912
+ ``` bash
2913
+ npm run doc
2914
+ ```
2915
+
2916
+ ### Publish
2917
+
2918
+ The publishing is completely handled by ` lerna ` (you can add ` -- --bump major ` to force a major release)
2919
+ Simply run
2920
+ ``` shell
2921
+ npm run publish
2922
+ ```
2923
+
2924
+ ### modifying submodules
2925
+
2926
+ The repo uses https:// for submodules which means you won't be able to push directly into the submodules.
2927
+ One easy solution is t modify ` ~/.gitconfig ` and add
2928
+ ```
2929
+
2930
+ pushInsteadOf = https://github.com/
2931
+ ```
2932
+
2933
+ [ ] ( #questions )
2934
+
2935
+ ## Questions
2936
+
2937
+ If you have any questions/issues/comments please feel free to create an issue or start a conversation in the [ NativeScript Community Discord] ( https://nativescript.org/discord ) .
0 commit comments