Files
jrshikoku/components/atom/TextBox.tsx
harukin-expo-dev-env 3ca109edee feat: メイン画面のレスポンシブ対応 - Menu/atom/TrainMenuコンポーネントにスケーリング適用
- 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
2026-03-29 15:41:06 +00:00

26 lines
668 B
TypeScript

import { TouchableOpacity, View } from "react-native";
import { useResponsive } from "@/lib/responsive";
export const TextBox = (props) => {
const { backgroundColor, flex, onPressButton, children } = props;
const { verticalScale } = useResponsive();
return (
<TouchableOpacity
style={{
flex: flex,
backgroundColor: backgroundColor,
padding: 5,
minHeight: verticalScale(70),
alignItems: "center",
alignContent: "center",
margin: 2,
}}
onPress={onPressButton}
>
<View style={{ flex: 1 }} />
{children}
<View style={{ flex: 1 }} />
</TouchableOpacity>
);
};