Skip to main content

Function: createDeepThemeOverride()

createDeepThemeOverride(baseTheme: ThemeConfig, deepOverrides: DeepThemeOverride): ThemeConfig

Defined in: shared/types/themeConfig.ts:863

Creates a deeply customized theme using PartialDeep pattern for maximum flexibility.

Parametersโ€‹

baseThemeโ€‹

ThemeConfig

Base theme configuration

deepOverridesโ€‹

DeepThemeOverride

Deep partial overrides using PartialDeep pattern

Returnsโ€‹

ThemeConfig

Theme configuration with deeply merged overrides

Remarksโ€‹

Uses type-fest's PartialDeep to allow modification of any nested property without requiring complete object structures. This is ideal for fine-grained theme customization where only specific values need to be changed.

Exampleโ€‹

const customTheme = createDeepThemeOverride(baseTheme, {
colors: {
text: { primary: "#1a1a1a" }, // Only change text primary color
background: { primary: "#ffffff" }, // Only change background primary
},
typography: {
fontSize: { h1: "40px" }, // Only change h1 font size
},
});