Skip to content

Commit

Permalink
Embeds: Add Bluesky variation (#61352)
Browse files Browse the repository at this point in the history
* Feat: Adds the bluesky variation

* Changed the SVG Icon for Bluesky

* Removed the responsive property from Bluesky variation

* Fixed pattern regular expression

Co-authored-by: amitraj2203 <amitraj2203@git.wordpress.org>
Co-authored-by: swissspidy <swissspidy@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
  • Loading branch information
4 people committed May 6, 2024
1 parent ea2e969 commit 57c5b9a
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 viewBox="0 0 24 24">
<Path
fill="#0a7aff"
d="M6.3,4.2c2.3,1.7,4.8,5.3,5.7,7.2.9-1.9,3.4-5.4,5.7-7.2,1.7-1.3,4.3-2.2,4.3.9s-.4,5.2-.6,5.9c-.7,2.6-3.3,3.2-5.6,2.8,4,.7,5.1,3,2.9,5.3-5,5.2-6.7-2.8-6.7-2.8,0,0-1.7,8-6.7,2.8-2.2-2.3-1.2-4.6,2.9-5.3-2.3.4-4.9-.3-5.6-2.8-.2-.7-.6-5.3-.6-5.9,0-3.1,2.7-2.1,4.3-.9h0Z"
/>
</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?:\/\/bsky\.app\/profile\/.+\/post\/.+/i ],
attributes: { providerNameSlug: 'bluesky' },
},
];

/**
Expand Down

0 comments on commit 57c5b9a

Please sign in to comment.