Skip to content

Commit cefe101

Browse files
committed
chore(BottomSheet): add readme
1 parent 0d2549e commit cefe101

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

packages/bottomsheet/README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export function openBottomSheet(args) {
122122

123123
##
124124

125-
### NativeScript + Vue
125+
### NativeScript + Vue 2
126126
```typescript
127127
import Vue from 'nativescript-vue';
128128
import BottomSheetPlugin from '@nativescript-community/ui-material-bottomsheet/vue';
@@ -141,6 +141,31 @@ const options: VueBottomSheetOptions = {
141141
this.$showBottomSheet(MyComponent, options)
142142
```
143143

144+
### NativeScript + Vue 3
145+
```typescript
146+
import Vue from 'nativescript-vue';
147+
import { BottomSheetPlugin } from '@nativescript-community/ui-material-bottomsheet/vue-3';
148+
import { install } from "@nativescript-community/ui-material-bottomsheet";
149+
install();
150+
151+
app.use(BottomSheetPlugin);
152+
```
153+
Then you can show a Vue component:
154+
```typescript
155+
import { useBottomSheet } from "@nativescript-community/ui-material-bottomsheet/vue-3";
156+
import MyComponent from 'MyComponent.vue';
157+
158+
159+
const options: VueBottomSheetOptions = {
160+
...
161+
};
162+
163+
const { showBottomSheet, closeBottomSheet } = useBottomSheet()
164+
165+
showBottomSheet(MyComponent, options);
166+
closeBottomSheet();
167+
```
168+
144169
##
145170

146171
### NativeScript + Angular

0 commit comments

Comments
 (0)