Skip to content

Commit

Permalink
Add youtube short icon (#461)
Browse files Browse the repository at this point in the history
* first commit

* added types to storybook file

---------

Co-authored-by: Hugues Coulard <[email protected]>
  • Loading branch information
Xegushu and Hugues Coulard authored Dec 20, 2024
1 parent 8b2647a commit f7eabd4
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 2 deletions.
2 changes: 2 additions & 0 deletions addon/components/o-s-s/social-post-badge.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ const SocialPostTypes = [
'article',
'facebook_status',
'instagram_media',
'instagram_reel',
'tiktok_video',
'story',
'tweet',
'pin',
'youtube_video',
'youtube_short',
'twitch_stream'
];

Expand Down
2 changes: 2 additions & 0 deletions addon/components/o-s-s/social-post-badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export type SocialPostType =
| 'tweet'
| 'pin'
| 'youtube_video'
| 'youtube_short'
| 'twitch_stream';

type skinDefinitionType = { [key in SocialPostType]: string };
Expand All @@ -27,6 +28,7 @@ export const skinMatching: skinDefinitionType = {
tweet: 'fab fa-x-twitter',
pin: 'fab fa-pinterest',
youtube_video: 'fab fa-youtube',
youtube_short: 'youtube-short.svg',
twitch_stream: 'fab fa-twitch'
};

Expand Down
3 changes: 2 additions & 1 deletion app/styles/atoms/social-post-badge.less
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
}
}

&--youtube_video {
&--youtube_video,
&--youtube_short {
border: 1px solid var(~'--color-youtube-500');
color: var(~'--color-youtube-500');

Expand Down
3 changes: 3 additions & 0 deletions public/assets/upf-icons/youtube-short.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions tests/dummy/app/controllers/visual.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ export default class Visual extends Controller {
key: 'youtube_video',
active: false
},
{
key: 'youtube_short',
active: false
},
{
key: 'twitch_stream',
active: false
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/components/o-s-s/social-post-badge-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const ICONS_MATCHING: Record<string, string> = {
twitch_stream: '.fab.fa-twitch'
};
const IMG_MATCHING: Record<string, string> = {
instagram_reel: 'instagram-reel.svg'
instagram_reel: 'instagram-reel.svg',
youtube_short: 'youtube-short.svg'
};

module('Integration | Component | o-s-s/social-post-badge', function (hooks) {
Expand Down

0 comments on commit f7eabd4

Please sign in to comment.