26 lines
709 B
TypeScript
26 lines
709 B
TypeScript
import React, { FC } from "react";
|
|
import { Text, View } from "react-native";
|
|
|
|
type Props = {
|
|
lastStation: string;
|
|
ToData: string;
|
|
Station_JP: string;
|
|
};
|
|
export const LastStation: FC<Props> = ({ lastStation, ToData, Station_JP }) => {
|
|
const isEdit = !ToData ? false : ToData !== lastStation;
|
|
const string = isEdit ? ToData : lastStation;
|
|
return (
|
|
<View style={{ flex: 4, flexDirection: "row" }}>
|
|
<Text
|
|
style={{
|
|
fontSize: lastStation?.length > 4 ? parseInt("12%") : parseInt("16%"),
|
|
color: isEdit ? "#ffd16fff" : "white",
|
|
fontWeight: "bold",
|
|
}}
|
|
>
|
|
{string === Station_JP ? "当駅止" : string}
|
|
</Text>
|
|
</View>
|
|
);
|
|
};
|