vue-socials
Version:
Social media share buttons and counts for Vue.js
38 lines (34 loc) • 990 B
JavaScript
import { defineComponent } from 'vue';
import BaseSocials from '../../mixins/BaseSocial/BaseSocial.js';
import getSerialisedParams from '../../utils/getSerialisedParams.js';
/**
* Hey!
*
* STelegram component used for Telegram social network
* @link https://telegram.org/
*/
/**
* Share parameters for link
* @link https://core.telegram.org/widgets/share#custom-buttons
*/
var STelegram = /* #__PURE__ */defineComponent({
name: 'STelegram',
mixins: [BaseSocials('Telegram')],
computed: {
networkURL: function networkURL() {
var BASE_URL = 'https://t.me/share/url';
var shareOptions = this.shareOptions;
var url = shareOptions.url,
text = shareOptions.text;
var serialisedParams = getSerialisedParams({
url: url,
text: text
});
return "".concat(BASE_URL).concat(serialisedParams);
}
},
render: function render() {
return this.generateComponent(this.networkURL);
}
});
export default STelegram;