Guest User

Guest User

  • Tech Writer
  • 2.1k
  • 466.5k

Make button responsive in react

Jun 15 2022 10:41 AM

Hi Team

 

I need some help below is my button, how do i call this class to my App.js because what i want to achieve is when its clicked it must send me to a new page(Login.js) and the color must be style orange(but this should be purely CSS not bootstrap)

// Button

import React from 'react';
import { Text, View, StyleSheet, Pressable } from 'react-native';export default function Button(props) {const { onPress, title = 'Save' } = props;return ({title});
}const styles = StyleSheet.create({button: {alignItems: 'center',justifyContent: 'center',paddingVertical: 12,paddingHorizontal: 32,borderRadius: 4,elevation: 3,backgroundColor: 'black',},text: {fontSize: 16,lineHeight: 21,fontWeight: 'bold',letterSpacing: 0.25,color: 'white',},
});