Changed Styles and Screen Size for Mobile Device #59
@ -15,8 +15,9 @@ import {
|
|||||||
import styles, { COLORS } from "@/styles/styles";
|
import styles, { COLORS } from "@/styles/styles";
|
||||||
import Section from "@/containers/Section";
|
import Section from "@/containers/Section";
|
||||||
import AppContext from "@/util/context";
|
import AppContext from "@/util/context";
|
||||||
import { Picker } from "@react-native-picker/picker";
|
|
||||||
import i18n from "@/i18n/i18n";
|
import i18n from "@/i18n/i18n";
|
||||||
|
import { Picker, PickerItem } from "@/containers/Picker";
|
||||||
|
import { ItemValue } from "@react-native-picker/picker/typings/Picker";
|
||||||
|
|
||||||
const IndexScreen: React.FC = () => {
|
const IndexScreen: React.FC = () => {
|
||||||
const [playerCount, setPlayerCount] = useState(2);
|
const [playerCount, setPlayerCount] = useState(2);
|
||||||
@ -84,9 +85,9 @@ const IndexScreen: React.FC = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
|
|
||||||
const handleLanguageChange = (language: string) => {
|
const handleLanguageChange = (language: ItemValue, _: any) => {
|
||||||
setSelectedLanguage(language);
|
setSelectedLanguage(language.toString());
|
||||||
i18n.changeLanguage(language);
|
i18n.changeLanguage(language.toString());
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -121,25 +122,9 @@ const IndexScreen: React.FC = () => {
|
|||||||
<Picker
|
<Picker
|
||||||
selectedValue={selectedLanguage}
|
selectedValue={selectedLanguage}
|
||||||
onValueChange={handleLanguageChange}
|
onValueChange={handleLanguageChange}
|
||||||
style={[styles.picker, { color: colors.TEXT }]}
|
|
||||||
dropdownIconColor={colors.TEXT}
|
|
||||||
>
|
>
|
||||||
<Picker.Item
|
<PickerItem label={i18n.t("english")} value="en" />
|
||||||
label={i18n.t("english")}
|
<PickerItem label={i18n.t("spanish")} value="es" />
|
||||||
value="en"
|
|
||||||
style={{
|
|
||||||
color: colors.TEXT,
|
|
||||||
backgroundColor: colors.PRIMARY,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Picker.Item
|
|
||||||
label={i18n.t("spanish")}
|
|
||||||
value="es"
|
|
||||||
style={{
|
|
||||||
color: colors.TEXT,
|
|
||||||
backgroundColor: colors.PRIMARY,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Picker>
|
</Picker>
|
||||||
</Section>
|
</Section>
|
||||||
|
|
||||||
@ -227,19 +212,23 @@ const IndexScreen: React.FC = () => {
|
|||||||
title={i18n.t("save_slot_1")}
|
title={i18n.t("save_slot_1")}
|
||||||
onPress={() => handleSave("SLOT1")}
|
onPress={() => handleSave("SLOT1")}
|
||||||
disabled={buyInAmount === null}
|
disabled={buyInAmount === null}
|
||||||
|
size="small"
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
title={i18n.t("save_slot_2")}
|
title={i18n.t("save_slot_2")}
|
||||||
onPress={() => handleSave("SLOT2")}
|
onPress={() => handleSave("SLOT2")}
|
||||||
disabled={buyInAmount === null}
|
disabled={buyInAmount === null}
|
||||||
|
size="small"
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
title={i18n.t("load_slot_1")}
|
title={i18n.t("load_slot_1")}
|
||||||
onPress={() => handleLoad("SLOT1")}
|
onPress={() => handleLoad("SLOT1")}
|
||||||
|
size="small"
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
title={i18n.t("load_slot_2")}
|
title={i18n.t("load_slot_2")}
|
||||||
onPress={() => handleLoad("SLOT2")}
|
onPress={() => handleLoad("SLOT2")}
|
||||||
|
size="small"
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
</Section>
|
</Section>
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
import React, { useMemo } from "react";
|
import React from "react";
|
||||||
import { Picker } from "@react-native-picker/picker";
|
|
||||||
import styles, { COLORS } from "@/styles/styles";
|
|
||||||
import i18n from "@/i18n/i18n";
|
import i18n from "@/i18n/i18n";
|
||||||
import { useColorScheme } from "react-native";
|
import { Picker, PickerItem } from "@/containers/Picker";
|
||||||
|
|
||||||
interface CurrencySelectorProps {
|
interface CurrencySelectorProps {
|
||||||
selectedCurrency: string;
|
selectedCurrency: string;
|
||||||
@ -13,53 +11,17 @@ const CurrencySelector: React.FC<CurrencySelectorProps> = ({
|
|||||||
selectedCurrency,
|
selectedCurrency,
|
||||||
setSelectedCurrency,
|
setSelectedCurrency,
|
||||||
}) => {
|
}) => {
|
||||||
const colorScheme = useColorScheme();
|
|
||||||
const darkMode = useMemo(() => colorScheme === "dark", [colorScheme]);
|
|
||||||
const colors = useMemo(
|
|
||||||
() => (darkMode ? COLORS.DARK : COLORS.LIGHT),
|
|
||||||
[darkMode]
|
|
||||||
);
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Picker
|
<Picker
|
||||||
selectedValue={selectedCurrency}
|
selectedValue={selectedCurrency}
|
||||||
onValueChange={(itemValue) => setSelectedCurrency(itemValue)}
|
onValueChange={(itemValue) => setSelectedCurrency(itemValue.toString())}
|
||||||
style={[styles.picker, { color: colors.TEXT }]}
|
|
||||||
dropdownIconColor={colors.TEXT}
|
|
||||||
testID="currency-picker" // ✅ Add testID here
|
testID="currency-picker" // ✅ Add testID here
|
||||||
>
|
>
|
||||||
<Picker.Item
|
<PickerItem label={i18n.t("usd")} value="$" />
|
||||||
label={i18n.t("usd")}
|
<PickerItem label={i18n.t("euro")} value="€" />
|
||||||
value="$"
|
<PickerItem label={i18n.t("pound")} value="£" />
|
||||||
style={{
|
<PickerItem label={i18n.t("inr")} value="₹" />
|
||||||
color: colors.TEXT,
|
|
||||||
backgroundColor: colors.PRIMARY,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Picker.Item
|
|
||||||
label={i18n.t("euro")}
|
|
||||||
value="€"
|
|
||||||
style={{
|
|
||||||
color: colors.TEXT,
|
|
||||||
backgroundColor: colors.PRIMARY,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Picker.Item
|
|
||||||
label={i18n.t("pound")}
|
|
||||||
value="£"
|
|
||||||
style={{
|
|
||||||
color: colors.TEXT,
|
|
||||||
backgroundColor: colors.PRIMARY,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Picker.Item
|
|
||||||
label={i18n.t("inr")}
|
|
||||||
value="₹"
|
|
||||||
style={{
|
|
||||||
color: colors.TEXT,
|
|
||||||
backgroundColor: colors.PRIMARY,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Picker>
|
</Picker>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -11,9 +11,15 @@ interface ButtonProps {
|
|||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
![]() fixed these. fixed these.
|
|||||||
title: string;
|
title: string;
|
||||||
onPress: () => void;
|
onPress: () => void;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
size?: "normal" | "small";
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Button: React.FC<ButtonProps> = ({ title, onPress, disabled }) => {
|
const Button: React.FC<ButtonProps> = ({
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
|
title,
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
|
onPress,
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
|
disabled,
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
|
size = "normal",
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
|
}) => {
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
const colorScheme = useColorScheme();
|
const colorScheme = useColorScheme();
|
||||||
const darkMode = useMemo(() => colorScheme === "dark", [colorScheme]);
|
const darkMode = useMemo(() => colorScheme === "dark", [colorScheme]);
|
||||||
const colors = useMemo(
|
const colors = useMemo(
|
||||||
@ -26,12 +32,19 @@ const Button: React.FC<ButtonProps> = ({ title, onPress, disabled }) => {
|
|||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
![]() fixed these. fixed these.
|
|||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
accessibilityRole="button"
|
accessibilityRole="button"
|
||||||
style={[
|
style={[
|
||||||
styles.button,
|
size == "normal" ? styles.button : styles.buttonSmall,
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
{ backgroundColor: colors.PRIMARY },
|
{ backgroundColor: colors.PRIMARY },
|
||||||
disabled && styles.disabled,
|
disabled && styles.disabled,
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<Text style={[styles.buttonText, { color: colors.TEXT }]}>{title}</Text>
|
<Text
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
|
style={[
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
|
size == "normal" ? styles.buttonText : styles.buttonTextSmall,
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
|
{ color: colors.TEXT },
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
|
]}
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
|
>
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
|
{title}
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
|
</Text>
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@ -44,22 +57,22 @@ const styles = StyleSheet.create({
|
|||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
![]() fixed these. fixed these.
|
|||||||
marginHorizontal: 5,
|
marginHorizontal: 5,
|
||||||
marginVertical: 5,
|
marginVertical: 5,
|
||||||
},
|
},
|
||||||
darkButton: {
|
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
backgroundColor: "#333333",
|
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
},
|
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
lightButton: {
|
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
backgroundColor: "#DDDDDD",
|
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
},
|
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
buttonText: {
|
buttonText: {
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: "bold",
|
fontWeight: "bold",
|
||||||
textAlign: "center",
|
textAlign: "center",
|
||||||
},
|
},
|
||||||
darkText: {
|
buttonSmall: {
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
color: "#FFFFFF",
|
paddingVertical: 5,
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
|
paddingHorizontal: 10,
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
|
borderRadius: 8,
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
|
marginHorizontal: 2,
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
|
marginVertical: 2,
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
},
|
},
|
||||||
lightText: {
|
buttonTextSmall: {
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
color: "#000000",
|
fontSize: 12,
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
|
fontWeight: "bold",
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
|
textAlign: "center",
|
||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
|
|||||||
},
|
},
|
||||||
disabled: {
|
disabled: {
|
||||||
opacity: 0.5,
|
opacity: 0.5,
|
||||||
|
|||||||
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() Can you run Free to resolve. Can you run `npx tsc` and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundant
Free to resolve.
![]() fixed these. fixed these.
![]() fixed these. fixed these.
|
49
containers/Picker.tsx
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
import styles, { COLORS } from "@/styles/styles";
|
||||||
|
import { PickerItemProps, PickerProps } from "@react-native-picker/picker";
|
||||||
|
import { useMemo } from "react";
|
||||||
|
import { useColorScheme, View } from "react-native";
|
||||||
|
import { Picker as RNPicker } from "@react-native-picker/picker";
|
||||||
|
|
||||||
|
export const PickerItem: React.FC<PickerItemProps> = (props) => {
|
||||||
|
const colorScheme = useColorScheme();
|
||||||
|
const darkMode = useMemo(() => colorScheme === "dark", [colorScheme]);
|
||||||
|
const colors = useMemo(
|
||||||
|
() => (darkMode ? COLORS.DARK : COLORS.LIGHT),
|
||||||
|
[darkMode]
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<RNPicker.Item
|
||||||
|
style={[
|
||||||
|
styles.pickerItem,
|
||||||
|
{ color: colors.TEXT, backgroundColor: colors.PRIMARY },
|
||||||
|
]}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const Picker: React.FC<PickerProps> = (props) => {
|
||||||
|
const colorScheme = useColorScheme();
|
||||||
|
const darkMode = useMemo(() => colorScheme === "dark", [colorScheme]);
|
||||||
|
const colors = useMemo(
|
||||||
|
() => (darkMode ? COLORS.DARK : COLORS.LIGHT),
|
||||||
|
[darkMode]
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View style={styles.pickerWrapper}>
|
||||||
|
<RNPicker
|
||||||
|
style={[
|
||||||
|
styles.picker,
|
||||||
|
{
|
||||||
|
color: colors.TEXT,
|
||||||
|
backgroundColor: colors.PRIMARY,
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
dropdownIconColor={colors.TEXT}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
};
|
@ -32,7 +32,7 @@ const GlobalStyles = StyleSheet.create({
|
|||||||
gap: 10,
|
gap: 10,
|
||||||
},
|
},
|
||||||
|
|
||||||
h1: { fontSize: 20, fontWeight: "bold" },
|
h1: { fontSize: 19, fontWeight: "bold" },
|
||||||
h2: { fontSize: 18, fontWeight: "normal" },
|
h2: { fontSize: 18, fontWeight: "normal" },
|
||||||
p: {
|
p: {
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
@ -63,6 +63,10 @@ const GlobalStyles = StyleSheet.create({
|
|||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
pickerItem: {},
|
pickerItem: {},
|
||||||
|
pickerWrapper: {
|
||||||
|
borderRadius: 10,
|
||||||
|
overflow: "hidden",
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default GlobalStyles;
|
export default GlobalStyles;
|
||||||
|
I see you added atleast 3 new tranlated texts here, but it does not look like there are new additions to en.json and es.json.
I think this will result in an issue where the labels appear incorrect. Please confirm this and fix if necessary by adding the translations. This also applies to the title label
appearance
aboveYou may resolve this
Changing the color theme to be feels a bit like Setting, so the user may choose to do once and is unlikely to often interact with it.
Placing the Section for this feature prominently at the top and having it always be visible and and forcing the user to scroll beyond it for all interactions of the app may not be an ideal user experience.
I am not a UI/UX expert though. However, if you agree with what I am saying, you may choose to move this section into the toggable
Settings
menu just below. In that case you can make the change and resolve this.If the way you have it is intentional please let me know