Make RN components fully theme-driven for multi-brand support
Refactor all 18 React Native components from static DTColors imports to dynamic useDTTheme() context, enabling proper visual differentiation when switching between DT and Classic brands. Key changes: - Replace static DTColors with theme context in all components - Add shape tokens (bevel/radius) to DTExtendedTheme interface - Conditionally render SVG bevels (DT) vs borderRadius (Classic) - Configure fonts per brand (Tektur for DT, system sans-serif for Classic) - Update buildThemeFromBrand to parse shape and typography tokens - Fix Metro config for monorepo singleton resolution Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -124,6 +124,14 @@ export interface DTExtendedTheme extends MD3Theme {
|
||||
modeOther: string;
|
||||
border: string;
|
||||
borderEmphasis: string;
|
||||
/** Bevel sizes in pixels (0 = no bevels, use borderRadius instead) */
|
||||
bevelSm: number;
|
||||
bevelMd: number;
|
||||
bevelLg: number;
|
||||
/** Border radius in pixels (0 = angular/beveled) */
|
||||
radiusSm: number;
|
||||
radius: number;
|
||||
radiusLg: number;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -139,6 +147,12 @@ export const DTExtendedDarkTheme: DTExtendedTheme = {
|
||||
modeOther: DTColors.modeOther,
|
||||
border: DTColors.border,
|
||||
borderEmphasis: DTColors.borderEmphasis,
|
||||
bevelSm: 16,
|
||||
bevelMd: 32,
|
||||
bevelLg: 40,
|
||||
radiusSm: 0,
|
||||
radius: 0,
|
||||
radiusLg: 0,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user