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
559aa684
Commit
559aa684
authored
6 years ago
by
Julia Friesel
Browse files
Options
Downloads
Patches
Plain Diff
Visualize disabled action buttons
parent
8629fd53
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/symptoms/action-button-footer.js
+7
-2
7 additions, 2 deletions
components/cycle-day/symptoms/action-button-footer.js
styles/index.js
+6
-0
6 additions, 0 deletions
styles/index.js
with
13 additions
and
2 deletions
components/cycle-day/symptoms/action-button-footer.js
+
7
−
2
View file @
559aa684
...
@@ -38,6 +38,11 @@ export default class ActionButtonFooter extends Component {
...
@@ -38,6 +38,11 @@ export default class ActionButtonFooter extends Component {
return
(
return
(
<
View
style
=
{
styles
.
menu
}
>
<
View
style
=
{
styles
.
menu
}
>
{
buttons
.
map
(({
title
,
action
,
disabledCondition
,
icon
},
i
)
=>
{
{
buttons
.
map
(({
title
,
action
,
disabledCondition
,
icon
},
i
)
=>
{
const
textStyle
=
disabledCondition
?
styles
.
menuTextInActive
:
styles
.
menuText
const
iconStyle
=
disabledCondition
?
Object
.
assign
({},
iconStyles
.
menuIcon
,
iconStyles
.
menuIconInactive
)
:
iconStyles
.
menuIcon
return
(
return
(
<
TouchableOpacity
<
TouchableOpacity
onPress
=
{
action
}
onPress
=
{
action
}
...
@@ -45,8 +50,8 @@ export default class ActionButtonFooter extends Component {
...
@@ -45,8 +50,8 @@ export default class ActionButtonFooter extends Component {
disabled
=
{
disabledCondition
}
disabled
=
{
disabledCondition
}
key
=
{
i
.
toString
()}
key
=
{
i
.
toString
()}
>
>
<
Icon
name
=
{
icon
}
{...
iconStyle
s
.
menuIcon
}
/
>
<
Icon
name
=
{
icon
}
{...
iconStyle
}
/
>
<
Text
style
=
{
styles
.
menuText
}
>
<
Text
style
=
{
textStyle
}
>
{
title
}
{
title
}
<
/Text
>
<
/Text
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
...
...
This diff is collapsed.
Click to expand it.
styles/index.js
+
6
−
0
View file @
559aa684
...
@@ -119,6 +119,9 @@ export default StyleSheet.create({
...
@@ -119,6 +119,9 @@ export default StyleSheet.create({
menuText
:
{
menuText
:
{
color
:
fontOnPrimaryColor
color
:
fontOnPrimaryColor
},
},
menuTextInActive
:
{
color
:
'
lightgrey
'
},
headerCycleDay
:
{
headerCycleDay
:
{
flexDirection
:
'
row
'
,
flexDirection
:
'
row
'
,
justifyContent
:
'
space-between
'
justifyContent
:
'
space-between
'
...
@@ -177,5 +180,8 @@ export const iconStyles = {
...
@@ -177,5 +180,8 @@ export const iconStyles = {
menuIcon
:
{
menuIcon
:
{
size
:
20
,
size
:
20
,
color
:
fontOnPrimaryColor
color
:
fontOnPrimaryColor
},
menuIconInactive
:
{
color
:
'
lightgrey
'
}
}
}
}
\ 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