feat: add Babel configuration and update styles to use new theme structure
- 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.
This commit is contained in:
@@ -1,19 +1,21 @@
|
||||
import { StyleSheet } from "react-native-unistyles";
|
||||
import { theme } from "./theme";
|
||||
import { lightTheme, darkTheme } from "./theme";
|
||||
|
||||
// Configure Unistyles with our theme
|
||||
// Configure Unistyles with adaptive themes
|
||||
StyleSheet.configure({
|
||||
themes: {
|
||||
dark: theme,
|
||||
light: lightTheme,
|
||||
dark: darkTheme,
|
||||
},
|
||||
settings: {
|
||||
initialTheme: "dark",
|
||||
adaptiveThemes: true,
|
||||
},
|
||||
});
|
||||
|
||||
// Type augmentation for TypeScript
|
||||
type AppThemes = {
|
||||
dark: typeof theme;
|
||||
light: typeof lightTheme;
|
||||
dark: typeof darkTheme;
|
||||
};
|
||||
|
||||
declare module "react-native-unistyles" {
|
||||
|
||||
Reference in New Issue
Block a user