Skip to content

Commit

Permalink
feat(esl-share): add OOTB configuration for the Skype share button
Browse files Browse the repository at this point in the history
  • Loading branch information
dshovchko committed Dec 13, 2023
1 parent 5dd4ea4 commit c3a76c4
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/esl-share/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ Here is the list of available buttons for sharing via social media and messenger
- `pusha` - shares data into Pusha a social network service
- `reddit` - shares data into Reddit an American social news aggregation, content rating, and discussion website
- `sina-weibo` - shares data into Sina Weibo a microblogging website and app which compares to Twitter and Instagram
- `skype` - shares data into Skype an app for communication over the Internet
- `telegram` - shares data into Telegram a cloud-based, cross-platform instant messaging (IM) service
- `twitter` - shares data into Twitter a free social networking site where users broadcast short posts known as tweets
- `viber` - shares data into Viber a calling and messaging app that connects people
Expand Down
1 change: 1 addition & 0 deletions src/modules/esl-share/buttons/all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import './print';
import './pusha';
import './reddit';
import './sina-weibo';
import './skype';
import './telegram';
import './twitter';
import './viber';
Expand Down
14 changes: 14 additions & 0 deletions src/modules/esl-share/buttons/skype.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* eslint-disable max-len */
import '../actions/media-action';
import {ESLShareConfig} from '../core/esl-share-config';

import type {ESLShareButtonConfig} from '../core/esl-share-config';

export const skype: ESLShareButtonConfig = {
action: 'media',
icon: '<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="#fff" focusable="false" role="presentation" style="background: #009edc;" viewBox="0 0 32 32"><path d="M11 4c-3.86 0-7 3.14-7 7 0 1.03.32 1.99.72 2.88-.13.69-.22 1.39-.22 2.12a11.51 11.51 0 0 0 13.63 11.28c.88.4 1.84.72 2.87.72 3.86 0 7-3.14 7-7 0-1.03-.32-1.99-.72-2.88.13-.69.22-1.39.22-2.12A11.51 11.51 0 0 0 13.87 4.72 6.96 6.96 0 0 0 11 4Zm0 2c.86 0 1.67.21 2.38.6a1 1 0 0 0 .68.09 9.49 9.49 0 0 1 11.25 11.25 1 1 0 0 0 .1.69 4.98 4.98 0 0 1-6.78 6.78 1 1 0 0 0-.7-.1A9.49 9.49 0 0 1 6.69 14.06a1 1 0 0 0-.09-.69A4.98 4.98 0 0 1 11 6Zm4.84 3.16c-2.47 0-5.12 1.04-5.12 3.84 0 1.35.48 2.77 3.12 3.44l3.32.81c1 .25 1.25.8 1.25 1.31 0 .84-.84 1.66-2.35 1.66-2.95 0-2.57-2.25-4.15-2.25-.71 0-1.22.49-1.22 1.19 0 1.36 1.67 3.15 5.37 3.15 3.52 0 5.25-1.7 5.25-3.97 0-1.46-.67-3-3.34-3.59l-2.44-.56c-.92-.21-2-.48-2-1.35 0-.87.74-1.5 2.1-1.5 2.72 0 2.49 1.88 3.84 1.88.71 0 1.31-.4 1.31-1.13 0-1.68-2.66-2.93-4.94-2.93Z"/></svg>',
link: '//web.skype.com/share?url={u}&source=button&text={t}',
name: 'skype',
title: 'Skype'
};
ESLShareConfig.append(skype);
13 changes: 13 additions & 0 deletions src/modules/esl-share/test/buttons/skype.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import {createImportCheckTestPlan, createButtonMatchingTestPlan} from './button-test-plan-factory';

import '../../buttons/skype';

describe(
'ESLShare: "skype" button import appends button to config and registers the "media" action',
createImportCheckTestPlan('media')
);

describe(
'ESLShare: "skype" button object config matches button config',
createButtonMatchingTestPlan('skype', 'media')
);

0 comments on commit c3a76c4

Please sign in to comment.