Commit 208bfd80 by G

rename the Input component to InputWithTopLabel

parent 29dbf528
import type { VariantProps } from "@shopify/restyle"; import type { VariantProps } from "@shopify/restyle";
import type { Theme } from "@themes/Theme"; import type { Theme } from "@themes/Theme";
import { TextInput } from "react-native";
import type { TextInputProps } from "react-native"; import type { TextInputProps } from "react-native";
import { TextInput } from "react-native";
import Box from "./bases/Box"; import Box from "./bases/Box";
import Text from "./bases/Text"; import Text from "./bases/Text";
...@@ -10,7 +10,7 @@ type Props = TextInputProps & ...@@ -10,7 +10,7 @@ type Props = TextInputProps &
label: string; label: string;
}; };
const Input = ({ label, textVariants, ...rest }: Props) => { const InputWithTopLabel = ({ label, textVariants, ...rest }: Props) => {
return ( return (
<Box> <Box>
<Text variant={textVariants}>{label}</Text> <Text variant={textVariants}>{label}</Text>
...@@ -21,4 +21,4 @@ const Input = ({ label, textVariants, ...rest }: Props) => { ...@@ -21,4 +21,4 @@ const Input = ({ label, textVariants, ...rest }: Props) => {
); );
}; };
export default Input; export default InputWithTopLabel;
...@@ -2,7 +2,7 @@ import type { PaymentStackScreenComponentProps } from "@/navigations/Types"; ...@@ -2,7 +2,7 @@ import type { PaymentStackScreenComponentProps } from "@/navigations/Types";
import BeasyLogoIcon from "@components/BeasyLogoIcon"; import BeasyLogoIcon from "@components/BeasyLogoIcon";
import Button from "@components/Button"; import Button from "@components/Button";
import GoBackIconButton from "@components/GoBackIconButton"; import GoBackIconButton from "@components/GoBackIconButton";
import Input from "@components/Input"; import InputWithTopLabel from "@components/InputWithTopLabel";
import PaymentOption from "@components/PaymentOption"; import PaymentOption from "@components/PaymentOption";
import BackgroundGreenWhiteContentArea from "@components/backgrounds/BackgroundGreenWhiteContentArea"; import BackgroundGreenWhiteContentArea from "@components/backgrounds/BackgroundGreenWhiteContentArea";
import Box from "@components/bases/Box"; import Box from "@components/bases/Box";
...@@ -40,12 +40,16 @@ const NumberAndOtpForPaymentScreen: PaymentStackScreenComponentProps< ...@@ -40,12 +40,16 @@ const NumberAndOtpForPaymentScreen: PaymentStackScreenComponentProps<
<PaymentOption onPress={() => {}} paymentMethod={"OM"} /> <PaymentOption onPress={() => {}} paymentMethod={"OM"} />
</Box> </Box>
<Box mb={"l"}> <Box mb={"l"}>
<Input <InputWithTopLabel
label="Entrez le numero" label="Entrez le numero"
keyboardType="numeric" keyboardType="numeric"
textVariants={"black"} textVariants={"black"}
/> />
<Input label="Code OTP" keyboardType="numeric" textVariants={"black"} /> <InputWithTopLabel
label="Code OTP"
keyboardType="numeric"
textVariants={"black"}
/>
</Box> </Box>
<Button <Button
onPress={() => {}} onPress={() => {}}
......
...@@ -3,7 +3,7 @@ import type { PaymentStackScreenComponentProps } from "@/navigations/Types"; ...@@ -3,7 +3,7 @@ import type { PaymentStackScreenComponentProps } from "@/navigations/Types";
import BeasyLogoIcon from "@components/BeasyLogoIcon"; import BeasyLogoIcon from "@components/BeasyLogoIcon";
import Button from "@components/Button"; import Button from "@components/Button";
import GoBackIconButton from "@components/GoBackIconButton"; import GoBackIconButton from "@components/GoBackIconButton";
import Input from "@components/Input"; import InputWithTopLabel from "@components/InputWithTopLabel";
import PaymentOption from "@components/PaymentOption"; import PaymentOption from "@components/PaymentOption";
import BackgroundDefault from "@components/backgrounds/BackgroundDefault"; import BackgroundDefault from "@components/backgrounds/BackgroundDefault";
import Box from "@components/bases/Box"; import Box from "@components/bases/Box";
...@@ -134,7 +134,7 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI ...@@ -134,7 +134,7 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI
<PaymentOption onPress={() => {}} paymentMethod={paymentType} /> <PaymentOption onPress={() => {}} paymentMethod={paymentType} />
</Box> </Box>
<Box mb={"xl"}> <Box mb={"xl"}>
<Input <InputWithTopLabel
label="Entrez le montant" label="Entrez le montant"
autoFocus={true} autoFocus={true}
keyboardType="numeric" keyboardType="numeric"
......
...@@ -4,7 +4,7 @@ import authenticateUser from "@/utils/requests/authenticateUser"; ...@@ -4,7 +4,7 @@ import authenticateUser from "@/utils/requests/authenticateUser";
import getUserInformations from "@/utils/requests/userInformations"; import getUserInformations from "@/utils/requests/userInformations";
import Button from "@components/Button"; import Button from "@components/Button";
import ContainerBorderTopCurved from "@components/ContainerBorderTopCurved"; import ContainerBorderTopCurved from "@components/ContainerBorderTopCurved";
import Input from "@components/Input"; import InputWithTopLabel from "@components/InputWithTopLabel";
import BackgroundDefault from "@components/backgrounds/BackgroundDefault"; import BackgroundDefault from "@components/backgrounds/BackgroundDefault";
import Box from "@components/bases/Box"; import Box from "@components/bases/Box";
import Text from "@components/bases/Text"; import Text from "@components/bases/Text";
...@@ -107,14 +107,14 @@ const UserLoginScreen: MainStackScreenComponentProps<"userLoginScreen"> = ({ nav ...@@ -107,14 +107,14 @@ const UserLoginScreen: MainStackScreenComponentProps<"userLoginScreen"> = ({ nav
</Box> </Box>
<Box gap={"m"}> <Box gap={"m"}>
<Input <InputWithTopLabel
label="Email" label="Email"
// value={email} // value={email}
autoCorrect={false} autoCorrect={false}
textContentType="emailAddress" textContentType="emailAddress"
onChangeText={setEmail} onChangeText={setEmail}
/> />
<Input <InputWithTopLabel
label="Mot de passe" label="Mot de passe"
secureTextEntry={true} secureTextEntry={true}
textContentType="oneTimeCode" textContentType="oneTimeCode"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment