Skip to content

Commit 8347722

Browse files
authored
fix(ia): dashboard header bg color (#3840)
1 parent a14049c commit 8347722

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

includes/wizards/newspack/class-newspack-dashboard.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,10 @@ public function get_dashboard_network_cards() {
248248
*/
249249
public function get_local_data() {
250250
$site_name = get_bloginfo( 'name' );
251-
$theme_mods = get_theme_mods();
252251
$local_data = [
253252
'settings' => [
254253
'siteName' => $site_name,
255-
'headerBgColor' => $theme_mods['header_color_hex'] ?? '',
254+
'headerBgColor' => get_theme_mod( 'primary_color_hex', '#f0f0f0' ),
256255
],
257256
'sections' => $this->get_dashboard(),
258257
'plugins' => get_plugins(),

src/components/src/box-contrast/index.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ const BoxContrast = ( {
2626
isInverted?: boolean;
2727
className?: string;
2828
} ) => {
29-
const contrastColor = getContrast( hexColor );
29+
let contrastColor;
30+
if ( hexColor === '#f0f0f0' ) {
31+
contrastColor = '#1e1e1e';
32+
} else {
33+
contrastColor = getContrast( hexColor );
34+
}
3035
const style = isInverted
3136
? { color: hexColor, backgoundColor: contrastColor }
3237
: { backgroundColor: hexColor, color: contrastColor };

0 commit comments

Comments
 (0)