Skip to content

Commit 3c7ea54

Browse files
committed
docs(readme): add vue 3 description
1 parent 3981175 commit 3c7ea54

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,28 +59,62 @@
5959

6060
**npm**
6161
```shell
62+
# Vue 2
6263
npm install vue-socials
64+
65+
# Vue 3
66+
npm install vue-socials@next
6367
```
6468

6569
**yarn**
6670
```shell
71+
# Vue 2
6772
yarn add vue-socials
73+
74+
# Vue 3
75+
yarn add vue-socials@next
6876
```
6977

7078
**Import all components**
7179
```js
80+
/**
81+
* Vue 2
82+
*/
7283
import Vue from 'vue'
7384
import VueSocials from 'vue-socials';
7485

7586
Vue.use(VueSocials)
87+
88+
/**
89+
* Vue 3
90+
*/
91+
import { createApp } from 'vue'
92+
import VueSocials from 'vue-socials';
93+
import App from './App.vue'
94+
95+
const app = createApp(App)
96+
app.use(VueSocials)
7697
```
7798

7899
**Import only specific component**
79100
```js
101+
/**
102+
* Vue 2
103+
*/
80104
import Vue from 'vue'
81105
import { SGithub } from 'vue-socials';
82106

83107
Vue.component('SGithub', SGithub)
108+
109+
/**
110+
* Vue 3
111+
*/
112+
import { createApp } from 'vue'
113+
import { SGithub } from 'vue-socials';
114+
import App from './App.vue'
115+
116+
const app = createApp(App)
117+
app.component('SGithub', SGithub)
84118
```
85119

86120

0 commit comments

Comments
 (0)