Skip to content

Commit 7478e2f

Browse files
committed
refactor(hub-ui): decouple scheme value resolver
1 parent a51a445 commit 7478e2f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/hub-ui/src/client/state/branding.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import type { BrandingLogo, DevframeBranding } from '../../types'
33
import { computed, ref } from 'vue'
44
import { isDark } from './color-mode'
55

6+
type ColorSchemeValue = string | { light: string, dark: string }
7+
68
/** Branding with defaults resolved — what the UI actually renders. */
79
export interface ResolvedBranding {
810
productName: string
@@ -54,7 +56,7 @@ export function useBrandingBackground(): Ref<string | undefined> {
5456
return computed(() => resolveColorSchemeValue(currentBranding.value.background, isDark.value))
5557
}
5658

57-
function resolveColorSchemeValue(value: BrandingLogo | undefined, dark: boolean): string | undefined {
59+
function resolveColorSchemeValue(value: ColorSchemeValue | undefined, dark: boolean): string | undefined {
5860
if (!value)
5961
return undefined
6062
if (typeof value === 'string')

0 commit comments

Comments
 (0)