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
d2282f66
Commit
d2282f66
authored
6 years ago
by
Julia Friesel
Browse files
Options
Downloads
Patches
Plain Diff
Use built-in numberOfLines prop instead of truncating by hand
parent
bdda36de
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
components/app-text.js
+1
-0
1 addition, 0 deletions
components/app-text.js
components/cycle-day/cycle-day-overview.js
+5
-5
5 additions, 5 deletions
components/cycle-day/cycle-day-overview.js
with
6 additions
and
5 deletions
components/app-text.js
+
1
−
0
View file @
d2282f66
...
...
@@ -7,6 +7,7 @@ export default function AppText(props) {
<
Text
style
=
{[
styles
.
appText
,
props
.
style
]}
onPress
=
{
props
.
onPress
}
numberOfLines
=
{
props
.
numberOfLines
}
>
{
props
.
children
}
<
/Text
>
...
...
This diff is collapsed.
Click to expand it.
components/cycle-day/cycle-day-overview.js
+
5
−
5
View file @
d2282f66
...
...
@@ -167,10 +167,7 @@ export default class CycleDayOverView extends Component {
}
const
symptomValue
=
cycleDay
[
symptomName
]
const
label
=
l
[
symptomName
](
symptomValue
)
if
(
!
label
)
return
if
(
label
.
length
<
45
)
return
label
return
label
.
slice
(
0
,
42
)
+
'
...
'
return
l
[
symptomName
](
symptomValue
)
}
render
()
{
...
...
@@ -293,7 +290,10 @@ class SymptomBox extends Component {
<
/AppText
>
<
/View
>
<
View
style
=
{[
styles
.
symptomDataBox
,
disabledStyle
]}
>
<
AppText
style
=
{
styles
.
symptomDataText
}
>
{
this
.
props
.
data
}
<
/AppText
>
<
AppText
style
=
{
styles
.
symptomDataText
}
numberOfLines
=
{
3
}
>
{
this
.
props
.
data
}
<
/AppText
>
<
/View
>
<
/TouchableOpacity
>
)
...
...
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