feat: 更新主题颜色和标签栏选项
This commit is contained in:
@@ -3,7 +3,12 @@ import Ionicons from "@expo/vector-icons/MaterialIcons"
|
||||
|
||||
export default function TabLayout() {
|
||||
return (
|
||||
<Tabs>
|
||||
<Tabs
|
||||
screenOptions={{
|
||||
tabBarActiveTintColor: "#00D48C",
|
||||
tabBarInactiveTintColor: "#94A3B8",
|
||||
}}
|
||||
>
|
||||
<Tabs.Screen name="index" options={{ title: '消息', tabBarIcon: ({ color }) => <Ionicons size={28} name="message" color={color} /> }} />
|
||||
<Tabs.Screen name="contacts" options={{ title: '通讯录', tabBarIcon: ({ color }) => <Ionicons size={28} name="assignment-ind" color={color} /> }} />
|
||||
<Tabs.Screen name="discover" options={{ title: '发现', tabBarIcon: ({ color }) => <Ionicons size={28} name="compass-calibration" color={color} /> }} />
|
||||
|
||||
@@ -9,12 +9,28 @@ import { useColorScheme } from "react-native";
|
||||
|
||||
import { AppBootstrapProvider } from "@/providers/app-bootstrap-provider";
|
||||
|
||||
const lightTheme = {
|
||||
...DefaultTheme,
|
||||
colors: {
|
||||
...DefaultTheme.colors,
|
||||
primary: "#00D48C",
|
||||
},
|
||||
};
|
||||
|
||||
const darkTheme = {
|
||||
...DarkTheme,
|
||||
colors: {
|
||||
...DarkTheme.colors,
|
||||
primary: "#00D48C",
|
||||
},
|
||||
};
|
||||
|
||||
export default function RootLayout() {
|
||||
const colorScheme = useColorScheme();
|
||||
|
||||
return (
|
||||
<AppBootstrapProvider>
|
||||
<ThemeProvider value={colorScheme === "dark" ? DarkTheme : DefaultTheme}>
|
||||
<ThemeProvider value={colorScheme === "dark" ? darkTheme : lightTheme}>
|
||||
<Stack>
|
||||
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
|
||||
</Stack>
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
|
||||
@layer theme {
|
||||
@theme {
|
||||
--color-brand-50: #f5f7ff;
|
||||
--color-brand-100: #e9edff;
|
||||
--color-brand-500: #4f6bd9;
|
||||
--color-brand-700: #3147a6;
|
||||
--color-brand-50: #e9fbf4;
|
||||
--color-brand-100: #c7f5e3;
|
||||
--color-brand-500: #00d48c;
|
||||
--color-brand-700: #009d68;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user