Button Component in React Native expo component #4 | Web Scripts | Crax

Welcome To Crax.Pro Forum!

Check our new Marketplace at Crax.Shop

   Login! SignUp Now!
  • We are in solidarity with our brothers and sisters in Palestine. Free Palestine. To learn more visit this Page

  • Crax.Pro domain has been taken down!

    Alternatives: Craxpro.io | Craxpro.com

Button Component in React Native expo component #4

Button Component in React Native expo component #4

LV
0
 

tempcp001

Member
Joined
Jan 7, 2024
Threads
12
Likes
0
Awards
2
Credits
1,206©
Cash
0$
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'
import React from 'react'
import { ActivityIndicator } from 'react-native'
import { Colors } from '../constants/colors'
export default function SubmitButton({
title,
onPress,
loading
}) {
return (
<TouchableOpacity onPress={onPress}>
{
loading ?
<View style={styles.loginButton}>
<ActivityIndicator size={'small'} color='#fff' />
</View>
:
<Text style={styles.loginButton}>{title}</Text>
}
</TouchableOpacity>
)
}
const styles = StyleSheet.create({
loginButton: {
color: '#fff',
textAlign: 'center',
borderRadius: 5,
borderWidth: 1,
borderColor: Colors.primary,
padding: 10,
marginTop: 20,
backgroundColor: Colors.primary,
overflow: 'hidden',
},
})
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Top Bottom