- TitleBar: ヘッダー高さをverticalScaleに - UsefulBox: アイコン50→moderateScale、フォント16→fontScale - TicketBox: フォント18→fontScale - TextBox: minHeight 70→verticalScale - FixedContentBottom: 全fontSize(20/18)→fontScale、全アイコンsize(50/40)→moderateScale - JRSTraInfoBox: 全fontSize(30/20/18)、アイコン、maxHeight、ローディングサイズをスケーリング - SpecialTrainInfoBox: fontSize(30/20)→fontScale - CarouselTypeChanger: height 40→verticalScale
38 lines
954 B
TypeScript
38 lines
954 B
TypeScript
import { TouchableOpacity, Text } from "react-native";
|
|
import { useThemeColors } from "@/lib/theme";
|
|
import { useResponsive } from "@/lib/responsive";
|
|
|
|
export const TicketBox = (props) => {
|
|
const { colors, fixed } = useThemeColors();
|
|
const { fontScale } = useResponsive();
|
|
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",
|
|
justifyContent: "center",
|
|
}}
|
|
onPress={onPressButton}
|
|
onLongPress={onLongPressButton}
|
|
>
|
|
<Text style={{ color: fixed.textOnPrimary, fontWeight: "bold", fontSize: fontScale(18), textAlign: "center" }}>
|
|
{children}
|
|
</Text>
|
|
{icon}
|
|
</TouchableOpacity>
|
|
);
|
|
};
|