@mornya/react-social-libs
Version:
The project of React.js Social Share and Widget modules.
1 lines • 1.47 kB
JavaScript
var o,t,e=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}),r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},n=(Object.defineProperty(exports,"__esModule",{value:!0}),r(require("react"))),r=require("../utils/BaseWidgetComponent"),i=require("../utils/Loader"),r=(t=r.BaseWidgetComponent,e(TwitterFollow,t),TwitterFollow.prototype.onInit=function(){this.initialize("Twitter-Follow",{screenName:"",showScreenName:!1})},TwitterFollow.prototype.onRender=function(t){var e="".concat(TwitterFollow.LINK_URL,"/").concat(t.screenName.replace("@",""));return n.default.createElement("a",{id:this.id,href:e,className:"twitter-follow-button","data-show-screen-name":t.showScreenName?"true":"false","data-size":""},"Twitter Follow")},TwitterFollow.prototype.onMount=function(t){var e=this;(0,i.initTwitterSDK)().then(function(){return e.setApiStep()}).catch(console.error)},TwitterFollow.LINK_URL="https://twitter.com",TwitterFollow);function TwitterFollow(){return null!==t&&t.apply(this,arguments)||this}exports.default=r;