From 4197f50df84aeefde549692370ffd98cf859f20c Mon Sep 17 00:00:00 2001 From: Wagner Trezub Date: Wed, 10 Jan 2024 10:38:28 +0100 Subject: [PATCH] fix: listing bg colors --- .../volto/components/manage/Blocks/Listing/ListingBody.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/customizations/volto/components/manage/Blocks/Listing/ListingBody.jsx b/src/customizations/volto/components/manage/Blocks/Listing/ListingBody.jsx index 946009590..ea9dd328c 100644 --- a/src/customizations/volto/components/manage/Blocks/Listing/ListingBody.jsx +++ b/src/customizations/volto/components/manage/Blocks/Listing/ListingBody.jsx @@ -68,7 +68,11 @@ const ListingBody = React.memo( if (!block?.show_block_bg && !isSearchBlockResults) return 'full-width'; - let bg_color = data.bg_color ? `bg-${data.bg_color}` : 'bg-light'; + let bg_color = config.blocks?.blocksConfig[ + 'listing' + ]?.listing_bg_colors.some((color) => color.name === data.bg_color) + ? `bg-${data.bg_color}` + : 'bg-light'; if (block.template === 'gridGalleryTemplate') { return `section section-muted section-inset-shadow py-5 ${bg_color} ${