Skip to content

Instantly share code, notes, and snippets.

@sadewole
Last active September 5, 2023 01:47
Show Gist options
  • Save sadewole/460e58c2d163ce924d0a26399ef8fa66 to your computer and use it in GitHub Desktop.
Save sadewole/460e58c2d163ce924d0a26399ef8fa66 to your computer and use it in GitHub Desktop.
Credit card files
import { StatusBar } from 'expo-status-bar';
import {
SafeAreaView,
StyleSheet,
Text,
View,
TextInput,
TouchableOpacity,
} from 'react-native';
export default function App() {
return (
<SafeAreaView style={styles.container}>
<StatusBar style='light' />
<View style={{ padding: 16, flex: 1 }}>
<Text style={styles.header}>Card Payment</Text>
<View style={{ flex: 1 }}>
<View style={{ marginBottom: 16 }}>
<Text style={{ color: '#fff' }}>Card number</Text>
<TextInput style={styles.textInput} />
</View>
<View style={{ flexDirection: 'row', gap: 16 }}>
<View style={{ flex: 1 }}>
<Text style={{ color: '#fff' }}>Expiry date</Text>
<TextInput style={styles.textInput} />
</View>
<View style={{ flex: 1 }}>
<Text style={{ color: '#fff' }}>CVV number</Text>
<TextInput style={styles.textInput} />
</View>
</View>
</View>
<TouchableOpacity style={styles.button}>
<Text style={{ color: '#fff' }}>Save</Text>
</TouchableOpacity>
</View>
</SafeAreaView>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#010101',
},
header: {
textAlign: 'center',
fontSize: 30,
fontWeight: 600,
marginBottom: 24,
color: '#fff',
},
textInput: {
borderRadius: 8,
borderWidth: 2,
padding: 12,
backgroundColor: '#fff',
fontSize: 16,
},
button: {
backgroundColor: '#C51B53',
borderRadius: 24,
padding: 12,
alignItems: 'center',
justifyContent: 'center',
},
});
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sadewole
Copy link
Author

sadewole commented Sep 4, 2023

credit-card

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment