From 0ce3d1c999afbbd3e2b040785f4e4fba9bcd2f7b Mon Sep 17 00:00:00 2001 From: harukin-expo-dev-env Date: Sat, 31 Aug 2024 05:21:39 +0000 Subject: [PATCH] =?UTF-8?q?StationName=E3=82=92=E7=A7=BB=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/駅名表/Sign.js | 19 +++---------------- components/駅名表/StationName.tsx | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 16 deletions(-) create mode 100644 components/駅名表/StationName.tsx diff --git a/components/駅名表/Sign.js b/components/駅名表/Sign.js index 84ee25e..5fc113e 100644 --- a/components/駅名表/Sign.js +++ b/components/駅名表/Sign.js @@ -7,6 +7,8 @@ import { useInterval } from "../../lib/useInterval"; import { AS } from "../../storageControl"; import { useFavoriteStation } from "../../stateBox/useFavoriteStation"; +import { StationName } from "./StationName"; + import lineColorList from "../../assets/originData/lineColorList"; export default function Sign(props) { @@ -307,15 +309,7 @@ const StationNameArea = (props) => { ); }; -const StationName = (props) => { - const { stringData, ss } = props; - return ( - - {stringData.Station_JP} - {stringData.Station_EN} - - ); -}; + const styleSheet = { 外枠: { @@ -388,11 +382,4 @@ const styleSheet = { borderWidth: parseInt("2%"), borderRadius: parseInt("100%"), }, - 下枠駅名: { - fontWeight: "bold", - fontSize: parseInt("15%"), - color: "white", - flex: 1, - textAlignVertical: "center", - }, }; diff --git a/components/駅名表/StationName.tsx b/components/駅名表/StationName.tsx new file mode 100644 index 0000000..e94be54 --- /dev/null +++ b/components/駅名表/StationName.tsx @@ -0,0 +1,22 @@ +import React, { FC } from "react"; +import { Text, TextStyle, View } from "react-native"; +export const StationName: FC<{ + stringData: { Station_JP: string; Station_EN: string }; + ss: TextStyle; +}> = (props) => { + const { stringData, ss } = props; + return ( + + {stringData.Station_JP} + {stringData.Station_EN} + + ); +}; + +const styleSheet: TextStyle = { + fontWeight: "bold", + fontSize: parseInt("15%"), + color: "white", + flex: 1, + textAlignVertical: "center", +};