@@ -68,19 +68,31 @@ 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 }
7981 value = { this . props . isEnabled }
8082 />
8183
82- < ArrowIcon dir = "up" disabled = { isFirst } onPress = { this . onMoveUp } />
83- < ArrowIcon dir = "down" disabled = { isLast } onPress = { this . onMoveDown } />
84+ < ArrowIcon
85+ dir = "up"
86+ disabled = { isFirst }
87+ onPress = { this . onMoveUp }
88+ tint = { tint }
89+ />
90+ < ArrowIcon
91+ dir = "down"
92+ disabled = { isLast }
93+ onPress = { this . onMoveDown }
94+ tint = { tint }
95+ />
8496 </ View >
8597 )
8698 }
@@ -90,8 +102,9 @@ type ArrowIconProps = {
90102 dir : 'up' | 'down' ,
91103 disabled : boolean ,
92104 onPress : ( ) => any ,
105+ tint : string ,
93106}
94- const ArrowIcon = ( { dir, disabled, onPress} : ArrowIconProps ) => {
107+ const ArrowIcon = ( { dir, disabled, onPress, tint } : ArrowIconProps ) => {
95108 const icon = `md-arrow-${ dir } `
96109 const size = 24
97110
@@ -107,7 +120,7 @@ const ArrowIcon = ({dir, disabled, onPress}: ArrowIconProps) => {
107120
108121 return (
109122 < Touchable borderless = { true } onPress = { onPress } >
110- < IonIcon name = { icon } size = { size } style = { styles . icon } />
123+ < IonIcon name = { icon } size = { size } style = { [ styles . icon , { color : tint } ] } />
111124 </ Touchable >
112125 )
113126}
0 commit comments