parent
003561703c
commit
eec74305e1
3 changed files with 41 additions and 6 deletions
@ -0,0 +1,31 @@ |
||||
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> |
||||
); |
||||
} |
@ -1,13 +1,17 @@ |
||||
import React from 'react' |
||||
import { View, Text } from 'react-native'; |
||||
import {connect} from 'react-redux'; |
||||
import React from 'react'; |
||||
import {View} from 'react-native'; |
||||
import FormButton from '../../components/FormButton/index.js'; |
||||
|
||||
function Home({}) { |
||||
return ( |
||||
<View> |
||||
<Text></Text> |
||||
<FormButton |
||||
text={'ادامه'} |
||||
color={'#6CBE44'} |
||||
onPress={console.log('reza')} |
||||
/> |
||||
</View> |
||||
) |
||||
); |
||||
} |
||||
|
||||
export default Home; |
||||
|
Loading…
Reference in new issue