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
8a29f08d
Commit
8a29f08d
authored
2 years ago
by
BloodyMarie
Browse files
Options
Downloads
Patches
Plain Diff
Cycle Day styling improvements
parent
655f6b31
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
components/cycle-day/symptom-box.js
+20
-25
20 additions, 25 deletions
components/cycle-day/symptom-box.js
with
20 additions
and
25 deletions
components/cycle-day/symptom-box.js
+
20
−
25
View file @
8a29f08d
...
...
@@ -15,7 +15,6 @@ import { Colors, Sizes, Spacing } from '../../styles'
import
{
headerTitles
as
symptomTitles
}
from
'
../../i18n/en/labels
'
class
SymptomBox
extends
Component
{
static
propTypes
=
{
date
:
PropTypes
.
string
.
isRequired
,
isSymptomEdited
:
PropTypes
.
bool
,
...
...
@@ -33,7 +32,7 @@ class SymptomBox extends Component {
super
(
props
)
this
.
state
=
{
isSymptomEdited
:
props
.
isSymptomEdited
isSymptomEdited
:
props
.
isSymptomEdited
,
}
}
...
...
@@ -58,24 +57,24 @@ class SymptomBox extends Component {
const
iconName
=
`drip-icon-
${
symptom
}
`
const
symptomNameStyle
=
[
styles
.
symptomName
,
(
isSymptomDisabled
&&
styles
.
symptomNameDisabled
)
,
(
isExcluded
&&
styles
.
symptomNameExcluded
)
isSymptomDisabled
&&
styles
.
symptomNameDisabled
,
isExcluded
&&
styles
.
symptomNameExcluded
,
]
const
textStyle
=
[
styles
.
text
,
(
isSymptomDisabled
&&
styles
.
textDisabled
)
,
(
isExcluded
&&
styles
.
textExcluded
)
isSymptomDisabled
&&
styles
.
textDisabled
,
isExcluded
&&
styles
.
textExcluded
,
]
return
(
<
React
.
Fragment
>
{
isSymptomEdited
&&
{
isSymptomEdited
&&
(
<
SymptomEditView
symptom
=
{
symptom
}
symptomData
=
{
symptomData
}
onClose
=
{
this
.
onFinishEditing
}
/
>
}
)
}
<
TouchableOpacity
disabled
=
{
isSymptomDisabled
}
...
...
@@ -93,11 +92,11 @@ class SymptomBox extends Component {
<
AppText
style
=
{
symptomNameStyle
}
>
{
symptomTitles
[
symptom
].
toLowerCase
()}
<
/AppText
>
{
symptomDataToDisplay
&&
<
AppText
style
=
{
textStyle
}
numberOfLines
=
{
4
}
>
{
symptomDataToDisplay
&&
(
<
AppText
style
=
{
textStyle
}
numberOfLines
=
{
4
}
>
{
symptomDataToDisplay
}
<
/AppText
>
}
)
}
<
/View
>
<
/TouchableOpacity
>
<
/React.Fragment
>
...
...
@@ -112,20 +111,20 @@ const styles = StyleSheet.create({
borderRadius
:
scale
(
10
),
elevation
:
4
,
flexDirection
:
'
row
'
,
height
:
scale
(
1
2
0
),
height
:
scale
(
1
1
0
),
marginBottom
:
Spacing
.
base
,
paddingHorizontal
:
Spacing
.
small
,
paddingVertical
:
Spacing
.
base
,
width
:
Spacing
.
symptomTileWidth
width
:
Spacing
.
symptomTileWidth
,
},
symptomName
:
{
paddingTop
:
Sizes
.
tiny
,
color
:
Colors
.
purple
,
fontSize
:
Sizes
.
base
,
lineHeight
:
Sizes
.
base
lineHeight
:
Sizes
.
base
,
},
symptomNameDisabled
:
{
color
:
Colors
.
grey
color
:
Colors
.
grey
,
},
symptomNameExcluded
:
{
color
:
Colors
.
greyDark
,
...
...
@@ -134,28 +133,24 @@ const styles = StyleSheet.create({
flexDirection
:
'
column
'
,
justifyContent
:
'
center
'
,
marginLeft
:
Spacing
.
tiny
,
maxWidth
:
Spacing
.
textWidth
maxWidth
:
Spacing
.
textWidth
,
},
text
:
{
fontSize
:
Sizes
.
small
,
fontStyle
:
'
italic
'
,
lineHeight
:
Sizes
.
small
},
textDisabled
:
{
color
:
Colors
.
greyLight
color
:
Colors
.
greyLight
,
},
textExcluded
:
{
color
:
Colors
.
grey
,
}
}
,
})
const
mapStateToProps
=
(
state
)
=>
{
return
(
{
return
{
date
:
getDate
(
state
),
}
)
}
}
export
default
connect
(
mapStateToProps
,
null
,
)(
SymptomBox
)
export
default
connect
(
mapStateToProps
,
null
)(
SymptomBox
)
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