Skip to content

Commit

Permalink
Feat: Adds the bluesky variation
Browse files Browse the repository at this point in the history
  • Loading branch information
amitraj2203 committed May 3, 2024
1 parent 0612581 commit c19b78c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/block-library/src/embed/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,12 @@ export const embedPocketCastsIcon = {
</SVG>
),
};

export const embedBlueskyIcon = (
<SVG xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 320 286">
<Path
fill="rgb(10,122,255)"
d="M69.364 19.146c36.687 27.806 76.147 84.186 90.636 114.439 14.489-30.253 53.948-86.633 90.636-114.439C277.107-.917 320-16.44 320 32.957c0 9.865-5.603 82.875-8.889 94.729-11.423 41.208-53.045 51.719-90.071 45.357 64.719 11.12 81.182 47.953 45.627 84.785-80 82.874-106.667-44.333-106.667-44.333s-26.667 127.207-106.667 44.333c-35.555-36.832-19.092-73.665 45.627-84.785-37.026 6.362-78.648-4.149-90.071-45.357C5.603 115.832 0 42.822 0 32.957 0-16.44 42.893-.917 69.364 19.147Z"
/>
</SVG>
);
9 changes: 9 additions & 0 deletions packages/block-library/src/embed/variations.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
embedPinterestIcon,
embedWolframIcon,
embedPocketCastsIcon,
embedBlueskyIcon,
} from './icons';

/** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */
Expand Down Expand Up @@ -360,6 +361,14 @@ const variations = [
patterns: [ /^https?:\/\/(www\.)?wolframcloud\.com\/obj\/.+/i ],
attributes: { providerNameSlug: 'wolfram-cloud', responsive: true },
},
{
name: 'bluesky',
title: 'Bluesky',
icon: embedBlueskyIcon,
description: __( 'Embed a Bluesky post.' ),
patterns: [ /^https?:\/\/(www\.)?bsky\.app\/obj\/.+/i ],
attributes: { providerNameSlug: 'bluesky', responsive: true },
},
];

/**
Expand Down

0 comments on commit c19b78c

Please sign in to comment.