- 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
24 lines
673 B
TypeScript
24 lines
673 B
TypeScript
import React, { FC } from "react";
|
|
import { Linking } from "react-native";
|
|
import { Ionicons } from "@expo/vector-icons";
|
|
import { TicketBox } from "@/components/atom/TicketBox";
|
|
import { useThemeColors } from "@/lib/theme";
|
|
type Props = {
|
|
address: string;
|
|
press: () => void;
|
|
};
|
|
export const TrainBusButton: FC<Props> = ({ address, press }) => {
|
|
const { fixed } = useThemeColors();
|
|
return (
|
|
<TicketBox
|
|
backgroundColor={"#CE5C00"}
|
|
icon={<Ionicons name="bus" color={fixed.textOnPrimary} size={50} />}
|
|
flex={1}
|
|
onPressButton={press}
|
|
onLongPressButton={() => Linking.openURL(address)}
|
|
>
|
|
並行バス
|
|
</TicketBox>
|
|
);
|
|
};
|