Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2021-090 frontend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2021-090
2021-090 frontend
Commits
083d422f
Commit
083d422f
authored
Oct 11, 2021
by
Pramodh Rajapakse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
custom button component styling done
parent
75c29bcb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
9 deletions
+26
-9
assets/colors.js
assets/colors.js
+9
-4
components/button.component.js
components/button.component.js
+13
-3
screen/Home.Auction.Screen.js
screen/Home.Auction.Screen.js
+4
-2
No files found.
assets/colors.js
View file @
083d422f
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
;
components/button.component.js
View file @
083d422f
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
}
}
});
});
screen/Home.Auction.Screen.js
View file @
083d422f
...
@@ -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
>
);
);
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment