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
ff60db08
Commit
ff60db08
authored
6 years ago
by
Julia Friesel
Browse files
Options
Downloads
Patches
Plain Diff
Align grid
parent
29a82fca
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
components/cycle-day/cycle-day-overview.js
+64
-49
64 additions, 49 deletions
components/cycle-day/cycle-day-overview.js
styles/index.js
+2
-1
2 additions, 1 deletion
styles/index.js
with
66 additions
and
50 deletions
components/cycle-day/cycle-day-overview.js
+
64
−
49
View file @
ff60db08
...
...
@@ -3,7 +3,8 @@ import {
View
,
Text
,
Image
,
TouchableOpacity
TouchableOpacity
,
Dimensions
}
from
'
react-native
'
import
styles
from
'
../../styles
'
import
{
...
...
@@ -48,51 +49,52 @@ export default class DayView extends Component {
render
()
{
const
cycleDay
=
this
.
cycleDay
return
(
<
View
style
=
{
styles
.
symptomEditView
}
>
<
View
style
=
{
styles
.
symptomBoxesView
}
>
<
SymptomBox
title
=
'
Bleeding
'
icon
=
{
require
(
'
./assets/placeholder.png
'
)}
onPress
=
{()
=>
this
.
showView
(
'
BleedingEditView
'
)}
data
=
{
getLabel
(
'
bleeding
'
,
cycleDay
.
bleeding
)}
/
>
<
SymptomBox
title
=
'
Temperature
'
icon
=
{
require
(
'
./assets/placeholder.png
'
)}
onPress
=
{()
=>
this
.
showView
(
'
TemperatureEditView
'
)}
data
=
{
getLabel
(
'
temperature
'
,
cycleDay
.
temperature
)}
/
>
<
SymptomBox
title
=
'
Mucus
'
icon
=
{
require
(
'
./assets/placeholder.png
'
)}
onPress
=
{()
=>
this
.
showView
(
'
MucusEditView
'
)}
data
=
{
getLabel
(
'
mucus
'
,
cycleDay
.
mucus
)}
/
>
<
SymptomBox
title
=
'
Cervix
'
icon
=
{
require
(
'
./assets/placeholder.png
'
)}
onPress
=
{()
=>
this
.
showView
(
'
CervixEditView
'
)}
data
=
{
getLabel
(
'
cervix
'
,
cycleDay
.
cervix
)}
/
>
<
SymptomBox
title
=
'
Note
'
icon
=
{
require
(
'
./assets/placeholder.png
'
)}
onPress
=
{()
=>
this
.
showView
(
'
NoteEditView
'
)}
data
=
{
getLabel
(
'
note
'
,
cycleDay
.
note
)}
/
>
<
SymptomBox
title
=
'
Desire
'
icon
=
{
require
(
'
./assets/placeholder.png
'
)}
onPress
=
{()
=>
this
.
showView
(
'
DesireEditView
'
)}
data
=
{
getLabel
(
'
desire
'
,
cycleDay
.
desire
)}
/
>
<
SymptomBox
title
=
'
Sex
'
icon
=
{
require
(
'
./assets/placeholder.png
'
)}
onPress
=
{()
=>
this
.
showView
(
'
SexEditView
'
)}
data
=
{
getLabel
(
'
sex
'
,
cycleDay
.
sex
)}
/
>
<
/View
>
<
View
style
=
{
styles
.
symptomBoxesView
}
>
<
SymptomBox
title
=
'
Bleeding
'
icon
=
{
require
(
'
./assets/placeholder.png
'
)}
onPress
=
{()
=>
this
.
showView
(
'
BleedingEditView
'
)}
data
=
{
getLabel
(
'
bleeding
'
,
cycleDay
.
bleeding
)}
/
>
<
SymptomBox
title
=
'
Temperature
'
icon
=
{
require
(
'
./assets/placeholder.png
'
)}
onPress
=
{()
=>
this
.
showView
(
'
TemperatureEditView
'
)}
data
=
{
getLabel
(
'
temperature
'
,
cycleDay
.
temperature
)}
/
>
<
SymptomBox
title
=
'
Mucus
'
icon
=
{
require
(
'
./assets/placeholder.png
'
)}
onPress
=
{()
=>
this
.
showView
(
'
MucusEditView
'
)}
data
=
{
getLabel
(
'
mucus
'
,
cycleDay
.
mucus
)}
/
>
<
SymptomBox
title
=
'
Cervix
'
icon
=
{
require
(
'
./assets/placeholder.png
'
)}
onPress
=
{()
=>
this
.
showView
(
'
CervixEditView
'
)}
data
=
{
getLabel
(
'
cervix
'
,
cycleDay
.
cervix
)}
/
>
<
SymptomBox
title
=
'
Note
'
icon
=
{
require
(
'
./assets/placeholder.png
'
)}
onPress
=
{()
=>
this
.
showView
(
'
NoteEditView
'
)}
data
=
{
getLabel
(
'
note
'
,
cycleDay
.
note
)}
/
>
<
SymptomBox
title
=
'
Desire
'
icon
=
{
require
(
'
./assets/placeholder.png
'
)}
onPress
=
{()
=>
this
.
showView
(
'
DesireEditView
'
)}
data
=
{
getLabel
(
'
desire
'
,
cycleDay
.
desire
)}
/
>
<
SymptomBox
title
=
'
Sex
'
icon
=
{
require
(
'
./assets/placeholder.png
'
)}
onPress
=
{()
=>
this
.
showView
(
'
SexEditView
'
)}
data
=
{
getLabel
(
'
sex
'
,
cycleDay
.
sex
)}
/
>
{
/* this is just to make the last row adhere to the grid
(and) because there are no pseudo properties in RN */
}
<
FillerBoxes
/>
<
/View
>
)
}
...
...
@@ -160,12 +162,12 @@ function getLabel(symptomName, symptom) {
sex
.
patch
||
sex
.
ring
||
sex
.
implant
||
sex
.
other
)
{
sexLabel
+=
'
Contraceptive
'
}
return
sexLabel
?
sexLabel
:
'
edit
'
return
sexLabel
?
sexLabel
:
undefined
}
}
if
(
!
symptom
)
return
'
edit
'
return
labels
[
symptomName
](
symptom
)
||
'
edit
'
if
(
!
symptom
)
return
return
labels
[
symptomName
](
symptom
)
}
class
SymptomBox
extends
Component
{
...
...
@@ -183,4 +185,17 @@ class SymptomBox extends Component {
<
/TouchableOpacity
>
)
}
}
class
FillerBoxes
extends
Component
{
render
()
{
const
n
=
Dimensions
.
get
(
'
window
'
).
width
/
styles
.
symptomBox
.
minHeight
return
Array
(
Math
.
ceil
(
n
)).
fill
(
<
View
width
=
{
styles
.
symptomBox
.
minHeight
}
height
=
{
0
}
key
=
{
Math
.
random
().
toString
()}
/
>
)
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
styles/index.js
+
2
−
1
View file @
ff60db08
...
...
@@ -53,8 +53,9 @@ export default StyleSheet.create({
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
marginTop
:
'
20%
'
,
marginHorizontal
:
1
,
minWidth
:
100
,
minHeight
:
100
minHeight
:
100
,
},
symptomEditRow
:
{
justifyContent
:
'
space-between
'
,
...
...
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