設定ボタンを整理
This commit is contained in:
parent
c0cdad3683
commit
a40b5c1842
@ -58,112 +58,36 @@ export default function Setting(props) {
|
|||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
<View style={{ flex: 1 }}>
|
<View style={{ flex: 1 }}>
|
||||||
<View style={{ flexDirection: "row", padding: 10 }}>
|
<SwitchArea
|
||||||
<Text
|
str="列車アイコンを表示する"
|
||||||
style={{
|
bool={iconSetting}
|
||||||
fontSize: 25,
|
setBool={setIconSetting}
|
||||||
alignItems: "center",
|
/>
|
||||||
alignContent: "center",
|
<SwitchArea
|
||||||
textAlign: "center",
|
str="マップを表示する(beta)"
|
||||||
textAlignVertical: "center",
|
bool={mapSwitch}
|
||||||
}}
|
setBool={setMapSwitch}
|
||||||
>
|
/>
|
||||||
列車アイコンを表示する
|
<SwitchArea
|
||||||
</Text>
|
str="駅メニューを表示"
|
||||||
<View style={{ flex: 1 }} />
|
bool={stationMenu}
|
||||||
<SimpleSwitch
|
setBool={setStationMenu}
|
||||||
bool={iconSetting}
|
/>
|
||||||
setBool={setIconSetting}
|
<SwitchArea
|
||||||
color="red"
|
str="時刻表PDFをアプリ外で表示"
|
||||||
/>
|
bool={usePDFView}
|
||||||
</View>
|
setBool={setUsePDFView}
|
||||||
<View style={{ flexDirection: "row", padding: 10 }}>
|
/>
|
||||||
<Text
|
<SwitchArea
|
||||||
style={{
|
str="列車メニュー"
|
||||||
fontSize: 25,
|
bool={trainMenu}
|
||||||
alignItems: "center",
|
setBool={setTrainMenu}
|
||||||
alignContent: "center",
|
/>
|
||||||
textAlign: "center",
|
<SwitchArea
|
||||||
textAlignVertical: "center",
|
str="列車現在位置表示(alpha)"
|
||||||
}}
|
bool={trainPosition}
|
||||||
>
|
setBool={setTrainPosition}
|
||||||
マップを表示する(beta)
|
/>
|
||||||
</Text>
|
|
||||||
<View style={{ flex: 1 }} />
|
|
||||||
<SimpleSwitch bool={mapSwitch} setBool={setMapSwitch} color="red" />
|
|
||||||
</View>
|
|
||||||
<View style={{ flexDirection: "row", padding: 10 }}>
|
|
||||||
<Text
|
|
||||||
style={{
|
|
||||||
fontSize: 25,
|
|
||||||
alignItems: "center",
|
|
||||||
alignContent: "center",
|
|
||||||
textAlign: "center",
|
|
||||||
textAlignVertical: "center",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
駅メニューを表示
|
|
||||||
</Text>
|
|
||||||
<View style={{ flex: 1 }} />
|
|
||||||
<SimpleSwitch
|
|
||||||
bool={stationMenu}
|
|
||||||
setBool={setStationMenu}
|
|
||||||
color="red"
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
<View style={{ flexDirection: "row", padding: 10 }}>
|
|
||||||
<Text
|
|
||||||
style={{
|
|
||||||
fontSize: 25,
|
|
||||||
alignItems: "center",
|
|
||||||
alignContent: "center",
|
|
||||||
textAlign: "center",
|
|
||||||
textAlignVertical: "center",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
時刻表PDFをアプリ外で表示
|
|
||||||
</Text>
|
|
||||||
<View style={{ flex: 1 }} />
|
|
||||||
<SimpleSwitch
|
|
||||||
bool={usePDFView}
|
|
||||||
setBool={setUsePDFView}
|
|
||||||
color="red"
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
<View style={{ flexDirection: "row", padding: 10 }}>
|
|
||||||
<Text
|
|
||||||
style={{
|
|
||||||
fontSize: 25,
|
|
||||||
alignItems: "center",
|
|
||||||
alignContent: "center",
|
|
||||||
textAlign: "center",
|
|
||||||
textAlignVertical: "center",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
列車メニュー
|
|
||||||
</Text>
|
|
||||||
<View style={{ flex: 1 }} />
|
|
||||||
<SimpleSwitch bool={trainMenu} setBool={setTrainMenu} color="red" />
|
|
||||||
</View>
|
|
||||||
<View style={{ flexDirection: "row", padding: 10 }}>
|
|
||||||
<Text
|
|
||||||
style={{
|
|
||||||
fontSize: 25,
|
|
||||||
alignItems: "center",
|
|
||||||
alignContent: "center",
|
|
||||||
textAlign: "center",
|
|
||||||
textAlignVertical: "center",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
→列車現在位置表示(alpha)
|
|
||||||
</Text>
|
|
||||||
<View style={{ flex: 1 }} />
|
|
||||||
<SimpleSwitch
|
|
||||||
bool={trainPosition}
|
|
||||||
setBool={setTrainPosition}
|
|
||||||
color="red"
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
<View style={{ flexDirection: "row", padding: 10 }}>
|
<View style={{ flexDirection: "row", padding: 10 }}>
|
||||||
<Text
|
<Text
|
||||||
style={{
|
style={{
|
||||||
@ -246,3 +170,22 @@ const SimpleSwitch = ({ bool, setBool, color }) => (
|
|||||||
onValueChange={(value) => setBool(value.toString())}
|
onValueChange={(value) => setBool(value.toString())}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
const SwitchArea = ({ str, bool, setBool }) => {
|
||||||
|
return (
|
||||||
|
<View style={{ flexDirection: "row", padding: 10 }}>
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
fontSize: 25,
|
||||||
|
alignItems: "center",
|
||||||
|
alignContent: "center",
|
||||||
|
textAlign: "center",
|
||||||
|
textAlignVertical: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{str}
|
||||||
|
</Text>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
<SimpleSwitch bool={bool} setBool={setBool} color="red" />
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user