From 17eb609995ff60ac00cf79752885e57ed230bdce Mon Sep 17 00:00:00 2001 From: arunshenoy99 Date: Tue, 17 Jan 2023 11:59:46 +0530 Subject: [PATCH] fix site title and site tagline fonts for the gold shades --- .../Drawer/DrawerPanel/DesignTypography.js | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignTypography.js b/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignTypography.js index 97cf5fce7..2317ef254 100644 --- a/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignTypography.js +++ b/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignTypography.js @@ -70,6 +70,29 @@ const DesignTypography = () => { fontPalettesCopy[ fontStyle ]?.styles.blocks[ 'core/heading' ].typography.fontFamily; + if ( + globalStylesCopy.styles?.blocks[ 'core/site-title' ]?.typography + .fontFamily + ) { + globalStylesCopy.styles.blocks[ + 'core/site-title' + ].typography.fontFamily = + fontPalettesCopy[ fontStyle ]?.styles.blocks[ + 'core/heading' + ].typography.fontFamily; + } + + if ( + globalStylesCopy.styles?.blocks[ 'core/site-tagline' ]?.typography + .fontFamily + ) { + globalStylesCopy.styles.blocks[ + 'core/site-tagline' + ].typography.fontFamily = + fontPalettesCopy[ fontStyle ]?.styles.blocks[ + 'core/heading' + ].typography.fontFamily; + } // Saves the data to the Store currentData.data.typography.slug = fontStyle; @@ -188,7 +211,7 @@ const DesignTypography = () => { } */ } { fontPalettes && buildPalettes() } - {/* { fontPalettes && buildCustomPalette() } */} + { /* { fontPalettes && buildCustomPalette() } */ }
{ rerender }