幅指定をuseWindowDimensionsに変更
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
import React from "react";
|
||||
import { View, Text, TouchableOpacity } from "react-native";
|
||||
import {
|
||||
View,
|
||||
Text,
|
||||
TouchableOpacity,
|
||||
useWindowDimensions,
|
||||
} from "react-native";
|
||||
import { StateBox } from "./StateBox";
|
||||
import {
|
||||
heightPercentageToDP,
|
||||
@@ -13,13 +18,14 @@ export const TrainDataView = ({
|
||||
openTrainInfo,
|
||||
mode = 0,
|
||||
}) => {
|
||||
const { width, height } = useWindowDimensions();
|
||||
return (
|
||||
<View
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
//minHeight: 200,
|
||||
//height: heightPercentageToDP("20%"),
|
||||
width: widthPercentageToDP("100%"),
|
||||
width: width,
|
||||
flex: 1,
|
||||
}}
|
||||
>
|
||||
|
Reference in New Issue
Block a user