Skip to content

Commit

Permalink
PesquisarSorteioScreen part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Deyvid-Kasteh committed Dec 11, 2023
1 parent 4f8aa1c commit 0785d03
Show file tree
Hide file tree
Showing 103 changed files with 7,305 additions and 9 deletions.
Empty file.
44 changes: 44 additions & 0 deletions .history/components/NumericInput_20231211021446.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import React, { useState } from "react";
import { TextInput, StyleSheet, View } from "react-native";

interface NumericInputProps {
value: number | string;
onChangeText: (text: string) => void;
}

const NumericInput: React.FC<NumericInputProps> = ({ value, onChangeText }) => {
const handleTextChange = (text: string) => {
// Remove caracteres não numéricos
const numericText = text.replace(/[^0-9]/g, "");

// Atualiza o estado apenas se o texto for numérico ou vazio
if (numericText === "" || !isNaN(Number(numericText))) {
onChangeText(numericText);
}
};

return (
<View style={styles.container}>
<TextInput
style={styles.input}
keyboardType="numeric"
value={value.toString()}
onChangeText={handleTextChange}
/>
</View>
);
};

const styles = StyleSheet.create({
container: {
marginVertical: 10,
},
input: {
height: 40,
borderColor: "gray",
borderWidth: 1,
paddingHorizontal: 10,
},
});

export default NumericInput;
44 changes: 44 additions & 0 deletions .history/components/NumericInput_20231211021535.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import React, { useState } from "react";
import { TextInput, StyleSheet, View } from "react-native";

interface NumericInputProps {
value: number | string;
onChangeText: (text: string) => void;
}

const NumericInput: React.FC<NumericInputProps> = ({ value, onChangeText }) => {
const handleTextChange = (text: string) => {
// Remove caracteres não numéricos
const numericText = text.replace(/[^0-9]/g, "");

// Atualiza o estado apenas se o texto for numérico ou vazio
if (numericText === "" || !isNaN(Number(numericText))) {
onChangeText(numericText);
}
};

return (
<View style={styles.container}>
<TextInput
style={styles.input}
keyboardType="numeric"
value={value.toString()}
onChangeText={handleTextChange}
/>
</View>
);
};

const styles = StyleSheet.create({
container: {
marginVertical: 10,
},
input: {
height: 40,
borderColor: "gray",
borderWidth: 1,
paddingHorizontal: 10,
},
});

export default </>>;
44 changes: 44 additions & 0 deletions .history/components/NumericInput_20231211021539.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import React, { useState } from "react";
import { TextInput, StyleSheet, View } from "react-native";

interface NumericInputProps {
value: number | string;
onChangeText: (text: string) => void;
}

const NumericInput: React.FC<NumericInputProps> = ({ value, onChangeText }) => {
const handleTextChange = (text: string) => {
// Remove caracteres não numéricos
const numericText = text.replace(/[^0-9]/g, "");

// Atualiza o estado apenas se o texto for numérico ou vazio
if (numericText === "" || !isNaN(Number(numericText))) {
onChangeText(numericText);
}
};

return (
<View style={styles.container}>
<TextInput
style={styles.input}
keyboardType="numeric"
value={value.toString()}
onChangeText={handleTextChange}
/>
</View>
);
};

const styles = StyleSheet.create({
container: {
marginVertical: 10,
},
input: {
height: 40,
borderColor: "gray",
borderWidth: 1,
paddingHorizontal: 10,
},
});

export default;
44 changes: 44 additions & 0 deletions .history/components/NumericInput_20231211021544.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import React, { useState } from "react";
import { TextInput, StyleSheet, View } from "react-native";

interface NumericInputProps {
value: number | string;
onChangeText: (text: string) => void;
}

const NumericInput: React.FC<NumericInputProps> = ({ value, onChangeText }) => {
const handleTextChange = (text: string) => {
// Remove caracteres não numéricos
const numericText = text.replace(/[^0-9]/g, "");

// Atualiza o estado apenas se o texto for numérico ou vazio
if (numericText === "" || !isNaN(Number(numericText))) {
onChangeText(numericText);
}
};

return (
<View style={styles.container}>
<TextInput
style={styles.input}
keyboardType="numeric"
value={value.toString()}
onChangeText={handleTextChange}
/>
</View>
);
};

const styles = StyleSheet.create({
container: {
marginVertical: 10,
},
input: {
height: 40,
borderColor: "gray",
borderWidth: 1,
paddingHorizontal: 10,
},
});

export default NumericInput;
44 changes: 44 additions & 0 deletions .history/components/NumericInput_20231211021959.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import React, { useState } from "react";
import { TextInput, StyleSheet, View } from "react-native";

interface NumericInputProps {
value: number | string;
onChangeText: (text: string) => void;
}

const NumericInput: React.FC<NumericInputProps> = ({ value, onChangeText }) => {
const handleTextChange = (text: string) => {
// Remove caracteres não numéricos
const numericText = text.replace(/[^0-9]/g, "");

// Atualiza o estado apenas se o texto for numérico ou vazio
if (numericText === "" || !isNaN(Number(numericText))) {
onChangeText(numericText);
}
};

return (
<View style={styles.container}>
<TextInput
style={styles.input}
keyboardType="numeric"
value={value.toString()}
onChangeText={handleTextChange}
/>
</View>
);
};

const styles = StyleSheet.create({
container: {
// marginVertical: 10,
},
input: {
height: 40,
borderColor: "gray",
borderWidth: 1,
paddingHorizontal: 10,
},
});

export default NumericInput;
44 changes: 44 additions & 0 deletions .history/components/NumericInput_20231211022007.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import React, { useState } from "react";
import { TextInput, StyleSheet, View } from "react-native";

interface NumericInputProps {
value: number | string;
onChangeText: (text: string) => void;
}

const NumericInput: React.FC<NumericInputProps> = ({ value, onChangeText }) => {
const handleTextChange = (text: string) => {
// Remove caracteres não numéricos
const numericText = text.replace(/[^0-9]/g, "");

// Atualiza o estado apenas se o texto for numérico ou vazio
if (numericText === "" || !isNaN(Number(numericText))) {
onChangeText(numericText);
}
};

return (
<View style={styles.container}>
<TextInput
style={styles.input}
keyboardType="numeric"
value={value.toString()}
onChangeText={handleTextChange}
/>
</View>
);
};

const styles = StyleSheet.create({
container: {
marginVertical: 10,
},
input: {
height: 40,
borderColor: "gray",
borderWidth: 1,
paddingHorizontal: 10,
},
});

export default NumericInput;
44 changes: 44 additions & 0 deletions .history/components/NumericInput_20231211022009.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import React, { useState } from "react";
import { TextInput, StyleSheet, View } from "react-native";

interface NumericInputProps {
value: number | string;
onChangeText: (text: string) => void;
}

const NumericInput: React.FC<NumericInputProps> = ({ value, onChangeText }) => {
const handleTextChange = (text: string) => {
// Remove caracteres não numéricos
const numericText = text.replace(/[^0-9]/g, "");

// Atualiza o estado apenas se o texto for numérico ou vazio
if (numericText === "" || !isNaN(Number(numericText))) {
onChangeText(numericText);
}
};

return (
<View style={styles.container}>
<TextInput
style={styles.input}
keyboardType="numeric"
value={value.toString()}
onChangeText={handleTextChange}
/>
</View>
);
};

const styles = StyleSheet.create({
container: {
// marginVertical: 10,
},
input: {
height: 40,
borderColor: "gray",
borderWidth: 1,
paddingHorizontal: 10,
},
});

export default NumericInput;
44 changes: 44 additions & 0 deletions .history/components/NumericInput_20231211022030.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import React, { useState } from "react";
import { TextInput, StyleSheet, View } from "react-native";

interface NumericInputProps {
value: number | string;
onChangeText: (text: string) => void;
}

const NumericInput: React.FC<NumericInputProps> = ({ value, onChangeText }) => {
const handleTextChange = (text: string) => {
// Remove caracteres não numéricos
const numericText = text.replace(/[^0-9]/g, "");

// Atualiza o estado apenas se o texto for numérico ou vazio
if (numericText === "" || !isNaN(Number(numericText))) {
onChangeText(numericText);
}
};

return (
<View style={styles.container}>
<TextInput
style={styles.input}
keyboardType="numeric"
value={value.toString()}
onChangeText={handleTextChange}
/>
</View>
);
};

const styles = StyleSheet.create({
container: {
// marginVertical: 10,
},
input: {
// height: 40,
borderColor: "gray",
borderWidth: 1,
paddingHorizontal: 10,
},
});

export default NumericInput;
Loading

0 comments on commit 0785d03

Please sign in to comment.