From 5e6251366d77dc2702e302ac172fa33440edf60d Mon Sep 17 00:00:00 2001 From: Gulamdastgir Date: Mon, 23 Dec 2024 16:43:44 +0530 Subject: [PATCH] Add discord in social links. --- .../block-library/src/social-link/icons/discord.js | 10 ++++++++++ packages/block-library/src/social-link/icons/index.js | 1 + packages/block-library/src/social-link/index.php | 4 ++++ .../block-library/src/social-link/socials-with-bg.scss | 5 +++++ .../src/social-link/socials-without-bg.scss | 4 ++++ packages/block-library/src/social-link/variations.js | 7 +++++++ 6 files changed, 31 insertions(+) create mode 100644 packages/block-library/src/social-link/icons/discord.js diff --git a/packages/block-library/src/social-link/icons/discord.js b/packages/block-library/src/social-link/icons/discord.js new file mode 100644 index 00000000000000..eee72b5620155b --- /dev/null +++ b/packages/block-library/src/social-link/icons/discord.js @@ -0,0 +1,10 @@ +/** + * WordPress dependencies + */ +import { Path, SVG } from '@wordpress/primitives'; + +export const DiscordIcon = () => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/index.js b/packages/block-library/src/social-link/icons/index.js index 422ff6f02dd20e..bcc1976a7efb03 100644 --- a/packages/block-library/src/social-link/icons/index.js +++ b/packages/block-library/src/social-link/icons/index.js @@ -5,6 +5,7 @@ export * from './bluesky'; export * from './chain'; export * from './codepen'; export * from './deviantart'; +export * from './discord'; export * from './dribbble'; export * from './dropbox'; export * from './etsy'; diff --git a/packages/block-library/src/social-link/index.php b/packages/block-library/src/social-link/index.php index da28034f5a55d2..8b3a8c3e6ab624 100644 --- a/packages/block-library/src/social-link/index.php +++ b/packages/block-library/src/social-link/index.php @@ -169,6 +169,10 @@ function block_core_social_link_services( $service = '', $field = '' ) { 'name' => 'DeviantArt', 'icon' => '', ), + 'discord' => array( + 'name' => 'Discord', + 'icon' => '' + ), 'dribbble' => array( 'name' => 'Dribbble', 'icon' => '', diff --git a/packages/block-library/src/social-link/socials-with-bg.scss b/packages/block-library/src/social-link/socials-with-bg.scss index 35420fc624c0e6..8a23a1a2314ffe 100644 --- a/packages/block-library/src/social-link/socials-with-bg.scss +++ b/packages/block-library/src/social-link/socials-with-bg.scss @@ -33,6 +33,11 @@ color: #fff; } +.wp-social-link-discord { + background-color: #7289da; + color: #fff; +} + .wp-social-link-dribbble { background-color: #e94c89; color: #fff; diff --git a/packages/block-library/src/social-link/socials-without-bg.scss b/packages/block-library/src/social-link/socials-without-bg.scss index 24538b29824b17..696934e9b9d0c7 100644 --- a/packages/block-library/src/social-link/socials-without-bg.scss +++ b/packages/block-library/src/social-link/socials-without-bg.scss @@ -22,6 +22,10 @@ color: #02e49b; } +.wp-social-link-discord { + color: #7289da; +} + .wp-social-link-dribbble { color: #e94c89; } diff --git a/packages/block-library/src/social-link/variations.js b/packages/block-library/src/social-link/variations.js index a97a396882d761..59fb469181449d 100644 --- a/packages/block-library/src/social-link/variations.js +++ b/packages/block-library/src/social-link/variations.js @@ -9,6 +9,7 @@ import { ChainIcon, CodepenIcon, DeviantArtIcon, + DiscordIcon, DribbbleIcon, DropboxIcon, EtsyIcon, @@ -108,6 +109,12 @@ const variations = [ title: 'DeviantArt', icon: DeviantArtIcon, }, + { + name: 'discord', + attributes: { service: 'discord' }, + title: 'Discord', + icon: DiscordIcon, + }, { name: 'dribbble', attributes: { service: 'dribbble' },