Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Drip
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
backup
Drip
Commits
1c390f78
Commit
1c390f78
authored
6 years ago
by
Julia Friesel
Browse files
Options
Downloads
Patches
Plain Diff
Use realistic icon and set active state
parent
fae27843
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
components/cycle-day/assets/placeholder.png
+0
-0
0 additions, 0 deletions
components/cycle-day/assets/placeholder.png
components/cycle-day/cycle-day-overview.js
+23
-22
23 additions, 22 deletions
components/cycle-day/cycle-day-overview.js
styles/index.js
+12
-0
12 additions, 0 deletions
styles/index.js
with
35 additions
and
22 deletions
components/cycle-day/assets/placeholder.png
deleted
100644 → 0
+
0
−
0
View file @
fae27843
4.67 KiB
This diff is collapsed.
Click to expand it.
components/cycle-day/cycle-day-overview.js
+
23
−
22
View file @
1c390f78
...
...
@@ -2,11 +2,11 @@ import React, { Component } from 'react'
import
{
View
,
Text
,
Image
,
TouchableOpacity
,
Dimensions
}
from
'
react-native
'
import
styles
from
'
../../styles
'
import
Icon
from
'
react-native-vector-icons/FontAwesome
'
import
styles
,
{
iconStyles
}
from
'
../../styles
'
import
{
bleeding
as
bleedingLabels
,
mucusFeeling
as
feelingLabels
,
...
...
@@ -25,44 +25,37 @@ export default class DayView extends Component {
<
View
style
=
{
styles
.
symptomBoxesView
}
>
<
SymptomBox
title
=
'
Bleeding
'
icon
=
{
require
(
'
./assets/placeholder.png
'
)}
onPress
=
{()
=>
this
.
showView
(
'
BleedingEditView
'
)}
onPress
=
{()
=>
this
.
props
.
showView
(
'
BleedingEditView
'
)}
data
=
{
getLabel
(
'
bleeding
'
,
cycleDay
.
bleeding
)}
/
>
<
SymptomBox
title
=
'
Temperature
'
icon
=
{
require
(
'
./assets/placeholder.png
'
)}
onPress
=
{()
=>
this
.
showView
(
'
TemperatureEditView
'
)}
onPress
=
{()
=>
this
.
props
.
showView
(
'
TemperatureEditView
'
)}
data
=
{
getLabel
(
'
temperature
'
,
cycleDay
.
temperature
)}
/
>
<
SymptomBox
title
=
'
Mucus
'
icon
=
{
require
(
'
./assets/placeholder.png
'
)}
onPress
=
{()
=>
this
.
showView
(
'
MucusEditView
'
)}
onPress
=
{()
=>
this
.
props
.
showView
(
'
MucusEditView
'
)}
data
=
{
getLabel
(
'
mucus
'
,
cycleDay
.
mucus
)}
/
>
<
SymptomBox
title
=
'
Cervix
'
icon
=
{
require
(
'
./assets/placeholder.png
'
)}
onPress
=
{()
=>
this
.
showView
(
'
CervixEditView
'
)}
onPress
=
{()
=>
this
.
props
.
showView
(
'
CervixEditView
'
)}
data
=
{
getLabel
(
'
cervix
'
,
cycleDay
.
cervix
)}
/
>
<
SymptomBox
title
=
'
Note
'
icon
=
{
require
(
'
./assets/placeholder.png
'
)}
onPress
=
{()
=>
this
.
showView
(
'
NoteEditView
'
)}
onPress
=
{()
=>
this
.
props
.
showView
(
'
NoteEditView
'
)}
data
=
{
getLabel
(
'
note
'
,
cycleDay
.
note
)}
/
>
<
SymptomBox
title
=
'
Desire
'
icon
=
{
require
(
'
./assets/placeholder.png
'
)}
onPress
=
{()
=>
this
.
showView
(
'
DesireEditView
'
)}
onPress
=
{()
=>
this
.
props
.
showView
(
'
DesireEditView
'
)}
data
=
{
getLabel
(
'
desire
'
,
cycleDay
.
desire
)}
/
>
<
SymptomBox
title
=
'
Sex
'
icon
=
{
require
(
'
./assets/placeholder.png
'
)}
onPress
=
{()
=>
this
.
showView
(
'
SexEditView
'
)}
onPress
=
{()
=>
this
.
props
.
showView
(
'
SexEditView
'
)}
data
=
{
getLabel
(
'
sex
'
,
cycleDay
.
sex
)}
/
>
{
/* this is just to make the last row adhere to the grid
...
...
@@ -145,15 +138,23 @@ function getLabel(symptomName, symptom) {
class
SymptomBox
extends
Component
{
render
()
{
const
d
=
this
.
props
.
data
const
boxActive
=
d
?
styles
.
symptomBoxActive
:
{}
const
iconActive
=
d
?
iconStyles
.
symptomBoxActive
:
{}
const
textStyle
=
d
?
styles
.
symptomTextActive
:
{}
const
symptomBoxStyle
=
Object
.
assign
({},
styles
.
symptomBox
,
boxActive
)
const
iconStyle
=
Object
.
assign
({},
iconStyles
.
symptomBox
,
iconActive
)
return
(
<
TouchableOpacity
onPress
=
{
this
.
props
.
onPress
}
>
<
View
style
=
{
styles
.
symptomBox
}
>
<
I
mage
source
=
{
require
(
'
./assets/placeholder.png
'
)}
style
=
{
styles
.
symptomBoxImag
e
}
<
View
style
=
{
symptomBox
Style
}
>
<
I
con
name
=
'
thermometer
'
{...
iconStyl
e
}
/
>
<
Text
>
{
this
.
props
.
title
}
<
/Text
>
<
Text
>
{
this
.
props
.
data
}
<
/Text
>
<
Text
style
=
{
textStyle
}
>
{
this
.
props
.
title
}
<
/Text
>
<
Text
style
=
{
textStyle
}
>
{
this
.
props
.
data
}
<
/Text
>
<
/View
>
<
/TouchableOpacity
>
)
...
...
This diff is collapsed.
Click to expand it.
styles/index.js
+
12
−
0
View file @
1c390f78
...
...
@@ -58,6 +58,12 @@ export default StyleSheet.create({
minWidth
:
100
,
minHeight
:
100
,
},
symptomBoxActive
:
{
backgroundColor
:
secondaryColor
,
},
symptomTextActive
:
{
color
:
fontOnPrimaryColor
},
symptomEditRow
:
{
justifyContent
:
'
space-between
'
,
marginBottom
:
10
,
...
...
@@ -121,5 +127,11 @@ export const iconStyles = {
navigationArrow
:
{
size
:
45
,
color
:
fontOnPrimaryColor
},
symptomBox
:
{
size
:
40
},
symptomBoxActive
:
{
color
:
fontOnPrimaryColor
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment