-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.js
22 lines (19 loc) · 892 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import shareIt from './components/shareIt.vue';
import shareButton from './components/shareButton.vue';
import { library } from '@fortawesome/fontawesome-svg-core';
import { faTwitter, faFacebookF, faWhatsapp, faLinkedin, faRedditAlien } from '@fortawesome/free-brands-svg-icons';
import { faEnvelope } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
const shareItPlugin = {
install (Vue, options) {
library.add(faTwitter, faFacebookF, faWhatsapp, faLinkedin, faRedditAlien, faEnvelope);
Vue.component('font-awesome-icon', FontAwesomeIcon);
Vue.component('share-it', shareIt);
Vue.component('share-button', shareButton);
}
};
export default shareItPlugin;
// Automatic installation if Vue has been added to the global scope.
if (typeof window !== 'undefined' && window.Vue) {
window.Vue.use(shareItPlugin)
}