- Introduced a Babel configuration file for the app. - Updated various components and styles to utilize the new theme structure, replacing direct color references with palette-based colors for improved consistency and maintainability. - Adjusted styles across multiple components to align with the new theme, enhancing the overall UI experience.
24 lines
494 B
TypeScript
24 lines
494 B
TypeScript
import { StyleSheet } from "react-native-unistyles";
|
|
import { lightTheme, darkTheme } from "./theme";
|
|
|
|
// Configure Unistyles with adaptive themes
|
|
StyleSheet.configure({
|
|
themes: {
|
|
light: lightTheme,
|
|
dark: darkTheme,
|
|
},
|
|
settings: {
|
|
adaptiveThemes: true,
|
|
},
|
|
});
|
|
|
|
// Type augmentation for TypeScript
|
|
type AppThemes = {
|
|
light: typeof lightTheme;
|
|
dark: typeof darkTheme;
|
|
};
|
|
|
|
declare module "react-native-unistyles" {
|
|
export interface UnistylesThemes extends AppThemes {}
|
|
}
|