@mornya/react-social-libs
Version:
The project of React.js Social Share and Widget modules.
38 lines (37 loc) • 1.77 kB
JavaScript
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import React from 'react';
import { BaseWidgetComponent } from '../utils/BaseWidgetComponent';
var TumblrFollow = (function (_super) {
__extends(TumblrFollow, _super);
function TumblrFollow() {
return _super !== null && _super.apply(this, arguments) || this;
}
TumblrFollow.prototype.onInit = function () {
this.initialize('Tumblr-Follow', {
tumblelog: '',
});
};
TumblrFollow.prototype.onRender = function (extra, _OG) {
return (React.createElement("iframe", { id: this.id, src: this.mapToParam(TumblrFollow.LINK_URL, { type: 'follow', tumblelog: extra.tumblelog, color: 'blue' }), title: "Tumblr Follow", width: "65", height: "20", className: "btn", style: { border: 0 } }));
};
TumblrFollow.prototype.onMount = function (_extra) {
this.setApiStep();
};
TumblrFollow.LINK_URL = 'https://platform.tumblr.com/v2/follow_button.html';
return TumblrFollow;
}(BaseWidgetComponent));
export default TumblrFollow;