|
|
@@ -104,8 +104,10 @@ export default class TintedView extends Component<Props, State> {
|
|
104
|
104
|
|
|
105
|
105
|
const assignState = !this.state;
|
|
106
|
106
|
|
|
107
|
|
- if (prevColor !== nextColor || prevOpacity !== nextOpacity
|
|
108
|
|
- || prevStyle !== nextStyle || assignState) {
|
|
|
107
|
+ if (assignState
|
|
|
108
|
+ || prevColor !== nextColor
|
|
|
109
|
+ || prevOpacity !== nextOpacity
|
|
|
110
|
+ || prevStyle !== nextStyle) {
|
|
109
|
111
|
const nextState = {
|
|
110
|
112
|
style: {
|
|
111
|
113
|
...BASE_STYLE,
|
|
|
@@ -131,9 +133,13 @@ export default class TintedView extends Component<Props, State> {
|
|
131
|
133
|
* @returns {ReactElement}
|
|
132
|
134
|
*/
|
|
133
|
135
|
render() {
|
|
|
136
|
+ // XXX Don't tint the children, tint the background only.
|
|
134
|
137
|
return (
|
|
135
|
|
- <View style = { this.state.style }>
|
|
136
|
|
- { this.props.children }
|
|
|
138
|
+ <View style = { BASE_STYLE }>
|
|
|
139
|
+ <View style = { this.state.style } />
|
|
|
140
|
+ <View style = { BASE_STYLE }>
|
|
|
141
|
+ { this.props.children }
|
|
|
142
|
+ </View>
|
|
137
|
143
|
</View>
|
|
138
|
144
|
);
|
|
139
|
145
|
}
|