diff --git a/components/Settings/LayoutSettings.js b/components/Settings/LayoutSettings.js index 09e0547..44b36bb 100644 --- a/components/Settings/LayoutSettings.js +++ b/components/Settings/LayoutSettings.js @@ -58,7 +58,7 @@ export const LayoutSettings = ({ padding: 10, }} > - 設定画面 + レイアウト設定 @@ -90,15 +90,14 @@ export const LayoutSettings = ({ trueText={"オリジナル\n(駅名標)"} falseImage={require("../../assets/configuration/station_default.jpg")} trueImage={require("../../assets/configuration/station_original.jpg")} - /> - {stationMenu == "true" && ( + > - )} + - {trainMenu == "true" && ( - <> - - - - )} + > + + + @@ -151,12 +147,12 @@ const SimpleSwitch = ({ bool, setBool, str }) => ( checkedColor="red" onPress={() => setBool(bool == "true" ? "false" : "true")} containerStyle={{ - width: "100%", - backgroundColor: "white", + flex: 1, + backgroundColor: "#00000000", borderColor: "white", alignContent: "center", }} - textStyle={{ fontSize: 20 }} + textStyle={{ fontSize: 20, fontWeight: "normal" }} title={str} /> diff --git a/components/atom/SimpleSwitch.js b/components/atom/SimpleSwitch.js index da04c97..536226a 100644 --- a/components/atom/SimpleSwitch.js +++ b/components/atom/SimpleSwitch.js @@ -4,6 +4,7 @@ import { TouchableOpacity, Text, Image, + LayoutAnimation, } from "react-native"; export const SimpleSwitch = ({ bool, @@ -27,7 +28,10 @@ export const SimpleSwitch = ({ flexDirection: "row", flex: 1, }} - onPress={() => setBool(value.toString())} + onPress={() => { + LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut); + setBool(value.toString()); + }} > { return ( - + {str} @@ -40,6 +50,7 @@ export const SwitchArea = ({ subText={trueText} /> + {bool == "true" && children} ); }; diff --git a/components/atom/TripleSwitchArea.js b/components/atom/TripleSwitchArea.js index 026b454..5f8c99f 100644 --- a/components/atom/TripleSwitchArea.js +++ b/components/atom/TripleSwitchArea.js @@ -12,7 +12,7 @@ export const TripleSwitchArea = ({