import * as React from 'react'; import {Text, View, Pressable, GestureResponderEvent} from 'react-native'; import {StyleSheet} from 'react-native'; import styles from '../../../styles'; export interface props { children: React.ReactNode; onPress: (event: GestureResponderEvent) => void; color: string; width: number; } export default function ButtonCentered(props: props) { switch (props.color) { case 'Red': return ( {props.children} ); case 'Yellow': return ( {props.children} ); case 'Green': return ( {props.children} ); case 'Blue': return ( {props.children} ); } return ( Invalid button color specified ); }