UNPKG

@shopgate/engage

Version:
5 lines 604 B
import{themeConfig}from'@shopgate/pwa-common/helpers/config';import{hasWebBridge}from'@shopgate/engage/core/helpers';import{setCSSCustomProp}from"./cssCustomProperties";var defaultBackgroundColor=themeConfig.colors.light;/** * Updates the page background color. * @param {string} color The new background color. */export var setPageBackgroundColor=function setPageBackgroundColor(){var color=arguments.length>0&&arguments[0]!==undefined?arguments[0]:defaultBackgroundColor;// Curbside website changes never its background color if(!hasWebBridge()){setCSSCustomProp('--page-background-color',color);}};