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
33a3d12b
Commit
33a3d12b
authored
Oct 11, 2021
by
Pramodh Rajapakse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
countdown component added
parent
9406ec59
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
3 deletions
+38
-3
components/auction_item.component.js
components/auction_item.component.js
+12
-3
components/countdown_component.js
components/countdown_component.js
+26
-0
No files found.
components/auction_item.component.js
View file @
33a3d12b
...
@@ -2,6 +2,8 @@ import React from 'react';
...
@@ -2,6 +2,8 @@ import React from 'react';
import
{
StyleSheet
,
TouchableOpacity
,
Text
,
View
}
from
'
react-native
'
;
import
{
StyleSheet
,
TouchableOpacity
,
Text
,
View
}
from
'
react-native
'
;
import
themeColors
from
'
../assets/colors
'
;
import
themeColors
from
'
../assets/colors
'
;
import
{
MaterialIcons
}
from
'
@expo/vector-icons
'
;
import
{
MaterialIcons
}
from
'
@expo/vector-icons
'
;
import
AppCountDownTimer
from
'
./countdown_component
'
;
export
const
AppAuctionItem
=
props
=>
{
export
const
AppAuctionItem
=
props
=>
{
return
(
return
(
<
View
>
<
View
>
...
@@ -9,15 +11,19 @@ export const AppAuctionItem = props => {
...
@@ -9,15 +11,19 @@ export const AppAuctionItem = props => {
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
<
TouchableOpacity
onPress
=
{
props
.
onSelect
}
style
=
{
styles
.
button
}
>
<
TouchableOpacity
onPress
=
{
props
.
onSelect
}
style
=
{
styles
.
button
}
>
<
Text
style
=
{
styles
.
label
}
>
{
props
.
label
}
<
/Text
>
<
Text
style
=
{
styles
.
label
}
>
{
props
.
label
}
<
/Text
>
<
AppCountDownTimer
/>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
TouchableOpacity
onPress
=
{
props
.
onDelete
}
style
=
{
styles
.
delBtn
}
>
<
TouchableOpacity
onPress
=
{
props
.
onDelete
}
style
=
{
styles
.
delBtn
}
>
<
MaterialIcons
name
=
"
delete
"
size
=
{
24
}
color
=
{
themeColors
.
WHITE
}
/
>
<
MaterialIcons
name
=
"
delete
"
size
=
{
24
}
color
=
{
themeColors
.
WHITE
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
)
:
(
)
:
(
<
View
style
=
{
styles
.
container
}
>
<
TouchableOpacity
onPress
=
{
props
.
onPress
}
style
=
{
styles
.
button
}
>
<
TouchableOpacity
onPress
=
{
props
.
onPress
}
style
=
{
styles
.
button
}
>
<
Text
style
=
{
styles
.
label
}
>
{
props
.
label
}
<
/Text
>
<
Text
style
=
{
styles
.
label
}
>
{
props
.
label
}
<
/Text
>
<
AppCountDownTimer
/>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
)}
)}
<
/View
>
<
/View
>
...
@@ -35,6 +41,9 @@ const styles = StyleSheet.create({
...
@@ -35,6 +41,9 @@ const styles = StyleSheet.create({
fontSize
:
16
,
fontSize
:
16
,
flexGrow
:
1
,
flexGrow
:
1
,
marginRight
:
10
,
marginRight
:
10
,
flexDirection
:
'
row
'
,
justifyContent
:
'
space-between
'
,
alignItems
:
'
center
'
,
backgroundColor
:
themeColors
.
PRIMARY_COLOR
,
backgroundColor
:
themeColors
.
PRIMARY_COLOR
,
borderRadius
:
20
,
borderRadius
:
20
,
shadowColor
:
'
rgba(0,0,0, .4)
'
,
shadowColor
:
'
rgba(0,0,0, .4)
'
,
...
...
components/countdown_component.js
0 → 100644
View file @
33a3d12b
import
{
CountdownCircleTimer
}
from
'
react-native-countdown-circle-timer
'
import
React
from
'
react
'
;
import
{
Animated
}
from
'
react-native
'
;
import
themeColors
from
'
../assets/colors
'
;
const
AppCountDownTimer
=
()
=>
(
<
CountdownCircleTimer
isPlaying
size
=
{
40
}
strokeWidth
=
{
5
}
duration
=
{
10
}
colors
=
{[
[
'
#004777
'
,
0.4
],
[
'
#F7B801
'
,
0.4
],
[
'
#A30000
'
,
0.2
],
]}
>
{({
remainingTime
})
=>
(
<
Animated
.
Text
style
=
{{
color
:
themeColors
.
WHITE
}}
>
{
remainingTime
}
<
/Animated.Text
>
)}
<
/CountdownCircleTimer
>
);
export
default
AppCountDownTimer
\ No newline at end of file
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