Commit 083d422f authored by Pramodh Rajapakse's avatar Pramodh Rajapakse

custom button component styling done

parent 75c29bcb
export const PRIMARY_COLOR = '#11493E' const themeColors = {
export const SECONDARY_COLOR = '#808080'; PRIMARY_COLOR : '#11493E',
export const TERTIARY_COLOR = '#CECECE'; SECONDARY_COLOR : '#808080',
export const BLACK = '#191919'; TERTIARY_COLOR : '#CECECE',
BLACK : '#191919',
WHITE : '#FFFFFF'
};
export default themeColors;
import React from 'react'; import React from 'react';
import { StyleSheet, TouchableOpacity, View, Text } from 'react-native'; import { StyleSheet, TouchableOpacity, Text } from 'react-native';
import themeColors from '../assets/colors';
export const AppButton = (props) => { export const AppButton = (props) => {
return( return(
<TouchableOpacity onPress={props.onPress} style={styles.Button}> <TouchableOpacity onPress={props.onPress} style={styles.Button}>
<Text>{props.label}</Text> <Text style={styles.Text}>{props.label}</Text>
</TouchableOpacity> </TouchableOpacity>
) )
} }
...@@ -12,7 +13,16 @@ export const AppButton = (props) => { ...@@ -12,7 +13,16 @@ export const AppButton = (props) => {
const styles = StyleSheet.create({ const styles = StyleSheet.create({
Button:{ Button:{
alignItems: "center", alignItems: "center",
padding: 10 padding: 10,
fontSize: 16,
backgroundColor: themeColors.PRIMARY_COLOR,
borderRadius: 20,
margin: 20
},
Text: {
fontFamily: 'Poppins-Black',
fontSize: 22,
color: themeColors.WHITE
} }
}); });
...@@ -7,12 +7,14 @@ import {StyleSheet, View, Text, SafeAreaView, TouchableOpacity, TextInput, Image ...@@ -7,12 +7,14 @@ import {StyleSheet, View, Text, SafeAreaView, TouchableOpacity, TextInput, Image
import { Formik } from 'formik'; import { Formik } from 'formik';
import { FontAwesome } from '@expo/vector-icons'; import { FontAwesome } from '@expo/vector-icons';
import { MaterialCommunityIcons } from '@expo/vector-icons'; import { MaterialCommunityIcons } from '@expo/vector-icons';
import { Seperator } from "../components/button.component"; import { AppButton } from "../components/button.component";
const HomeAuctionScreen = ({navigation}) => { const HomeAuctionScreen = ({navigation}) => {
return ( return (
<SafeAreaView style={{flex: 1, color: 'yellow'}}> <SafeAreaView style={{flex: 1, color: 'yellow'}}>
<Seperator/> <AppButton
label='Test'
/>
</SafeAreaView> </SafeAreaView>
); );
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment