You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
733 B
32 lines
733 B
2 years ago
|
import React from 'react';
|
||
|
import {StyleSheet, Text, Pressable, Dimensions } from 'react-native';
|
||
|
|
||
|
export default function FormButton({text, color, onPress}) {
|
||
|
const styles = StyleSheet.create({
|
||
|
button: {
|
||
|
width : '100%',
|
||
|
alignItems: 'center',
|
||
|
justifyContent: 'center',
|
||
|
paddingVertical: 12,
|
||
|
paddingHorizontal: 0,
|
||
|
borderRadius: 6,
|
||
|
elevation: 3,
|
||
|
backgroundColor: color,
|
||
|
},
|
||
|
text: {
|
||
|
fontSize: Dimensions.get('window').width / 25,
|
||
|
fontWeight: '300',
|
||
|
color: 'white',
|
||
|
},
|
||
|
});
|
||
|
return (
|
||
|
<Pressable
|
||
|
color={color}
|
||
|
style={styles.button}
|
||
|
onPress={() => onPress}
|
||
|
>
|
||
|
<Text style={styles.text}>{text}</Text>
|
||
|
</Pressable>
|
||
|
);
|
||
|
}
|