Files
jrshikoku/components/atom/TicketBox.tsx
harukin-expo-dev-env 10df37d0a2 feat: Expo SDK 52→53 upgrade + full dark mode support
- Upgrade Expo SDK 52→53 (React 18→19, RN 0.76→0.79)
- Remove deprecated packages (native-base, react-native-elements)
- Migrate to @rneui/themed 5.0.0 + modular vector icons
- Fix breaking changes: defaultProps, BackHandler, notifications, key props
- Add Babel plugin for font scaling (replaces Text.defaultProps)
- Configure expo-font for native font preloading
- Add complete dark mode theme system (lib/theme/)
  - AppThemeProvider + useThemeColors hook
  - Light/dark/fixed color token definitions
  - Migrate ~60 files across all screens to use theme colors
- Set userInterfaceStyle to "automatic" for system dark mode
2026-03-17 22:19:46 +00:00

35 lines
797 B
TypeScript

import { TouchableOpacity, Text } from "react-native";
import { useThemeColors } from "@/lib/theme";
export const TicketBox = (props) => {
const { colors, fixed } = useThemeColors();
const {
icon,
backgroundColor,
flex,
onPressButton,
children,
onLongPressButton,
} = props;
return (
<TouchableOpacity
style={{
flex: flex,
backgroundColor: backgroundColor,
borderColor: colors.iconAccent,
padding: 10,
borderWidth: 1,
margin: 2,
alignItems: "center",
}}
onPress={onPressButton}
onLongPress={onLongPressButton}
>
<Text style={{ color: fixed.textOnPrimary, fontWeight: "bold", fontSize: 18 }}>
{children}
</Text>
{icon}
</TouchableOpacity>
);
};