Skip to content

Commit b180342

Browse files
committed
use the first color of the gradient to tint the edit home rows
1 parent 137b662 commit b180342

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

source/views/home/edit/row.android.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,13 @@ export class EditHomeRow extends React.PureComponent<Props> {
6868

6969
render() {
7070
const {item, isFirst, isLast} = this.props
71+
const tint = item.gradient ? item.gradient[0] : item.tint
72+
7173
return (
7274
<View style={styles.row}>
73-
<MenuIcon icon={this.props.item.icon} tint={item.tint} />
75+
<MenuIcon icon={this.props.item.icon} tint={tint} />
7476

75-
<Text style={[styles.text, {color: item.tint}]}>{item.title}</Text>
77+
<Text style={[styles.text, {color: tint}]}>{item.title}</Text>
7678

7779
<Switch
7880
onValueChange={this.onToggleSwitch}

source/views/home/edit/row.ios.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,15 @@ export class EditHomeRow extends React.Component<Props, State> {
161161
render() {
162162
const width = this.props.width - ROW_HORIZONTAL_MARGIN * 2
163163

164+
const tint = this.props.data.gradient
165+
? this.props.data.gradient[0]
166+
: this.props.data.tint
167+
164168
return (
165169
<Animated.View style={[styles.row, this.state.style, {width}]}>
166-
<MenuIcon icon={this.props.data.icon} tint={this.props.data.tint} />
170+
<MenuIcon icon={this.props.data.icon} tint={tint} />
167171

168-
<Text style={[styles.text, {color: this.props.data.tint}]}>
172+
<Text style={[styles.text, {color: tint}]}>
169173
{this.props.data.title}
170174
</Text>
171175

0 commit comments

Comments
 (0)