Skip to content

Commit

Permalink
docs(readme): add vue 3 description
Browse files Browse the repository at this point in the history
  • Loading branch information
webistomin committed Apr 24, 2021
1 parent bef5329 commit 6b11811
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,28 +59,62 @@

**npm**
```shell
# Vue 2
npm install vue-socials

# Vue 3
npm install vue-socials@next
```

**yarn**
```shell
# Vue 2
yarn add vue-socials

# Vue 3
yarn add vue-socials@next
```

**Import all components**
```js
/**
* Vue 2
*/
import Vue from 'vue'
import VueSocials from 'vue-socials';

Vue.use(VueSocials)

/**
* Vue 3
*/
import { createApp } from 'vue'
import VueSocials from 'vue-socials';
import App from './App.vue'

const app = createApp(App)
app.use(VueSocials)
```

**Import only specific component**
```js
/**
* Vue 2
*/
import Vue from 'vue'
import { SGithub } from 'vue-socials';

Vue.component('SGithub', SGithub)

/**
* Vue 3
*/
import { createApp } from 'vue'
import { SGithub } from 'vue-socials';
import App from './App.vue'

const app = createApp(App)
app.component('SGithub', SGithub)
```


Expand Down

1 comment on commit 6b11811

@vercel
Copy link

@vercel vercel bot commented on 6b11811 Apr 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.