Documentation Index
Fetch the complete documentation index at: https://docs.cloud.coinbase.com/llms.txt
Use this file to discover all available pages before exploring further.
function themeToCssVariables(theme: Record<string, string>): CDPWebCSSVariables;
Converts a theme object to a CSS variables object for the CDP web component library.
Parameters
| Parameter | Type | Description |
|---|
theme | Record<string, string> | The theme object to convert. |
Returns
CDPWebCSSVariables
A CSS variables object.
Example
const themeOverrides: Partial<Theme> = {
"color-bg-primary": "red",
};
// { "--cdp-web-color-bg-primary": "red" }
const cssVariables = themeToCssVariables(themeOverrides);