@selldone/sdk-storefront
Version:
A TypeScript SDK to connect to your shop and build a fully functional storefront and website by simply developing a frontend web application. All backend operations are seamlessly managed by the serverless Selldone solution.
20 lines (19 loc) • 1.27 kB
TypeScript
/**
* A helper class for managing theme-related functionalities, such as setting the theme color in the meta tag.
*/
export declare class ThemeHelper {
/**
* Sets the meta theme color in the document's head. If the meta tag does not exist, it creates one.
* This function can handle direct color values (e.g., hex, RGB, named colors) or CSS variables.
* If a CSS variable is provided (e.g., 'var(--background)'), the method will resolve the actual color value
* from the specified element in the DOM.
*
* @param color - The color to set for the theme, typically a string representing a hex code, RGB value, named color, or a CSS variable.
* If a CSS variable is used, it should be in the format 'var(--variable-name)'.
* @param calculator_element - A CSS selector string that identifies the element from which the CSS variable's value should be computed.
* This defaults to '#app .v-application'. If your CSS variable is defined in a different element,
* provide the appropriate selector.
*/
static SetMetaThemeColor(color: any, calculator_element?: string): Promise<void>;
static SetHtmlFontSize(low_vision: boolean): void;
}