UNPKG

vue-facebook-signin-button

Version:

A simple plugin to include a custom Facebook sign-in button into your web app

2 lines (1 loc) 902 B
'use strict';var _typeof='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&'function'==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?'symbol':typeof obj};(function(){function a(b){b.component('fb-signin-button',{name:'fb-signin-button',render:function render(c){return c('div',{attrs:{class:'fb-signin-button'},ref:'signinBtn'},this.$slots.default)},props:{params:{type:Object,required:!0,default:function _default(){return{}}}},mounted:function mounted(){var _this=this;this.$refs.signinBtn.addEventListener('click',function(){window.FB.login(function(d){_this.$emit(d.authResponse?'success':'error',d)},_this.params)})}})}'object'==('undefined'==typeof exports?'undefined':_typeof(exports))?module.exports=a:'function'==typeof define&&define.amd?define([],function(){return a}):window.Vue&&window.Vue.use(a)})();