diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2018-06-01 16:13:10 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2018-06-05 12:11:55 +0200 |
| commit | ca2f6fbfcad7b73d4ea63ef46cb1cab943ec9087 (patch) | |
| tree | b1f7754eb50896ab3681e35fa4e08be642b940c9 /app/components/Img.android.js | |
| parent | 5852c980980de53e00d76a0bdb4b41bf5c0f5b39 (diff) | |
| download | mullvadvpn-ca2f6fbfcad7b73d4ea63ef46cb1cab943ec9087.tar.xz mullvadvpn-ca2f6fbfcad7b73d4ea63ef46cb1cab943ec9087.zip | |
Add formatted source code
Diffstat (limited to 'app/components/Img.android.js')
| -rw-r--r-- | app/components/Img.android.js | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/app/components/Img.android.js b/app/components/Img.android.js index c1deb53bf7..229cb2c1b7 100644 --- a/app/components/Img.android.js +++ b/app/components/Img.android.js @@ -1,5 +1,5 @@ // @flow -import React, { Component } from 'react'; +import React, { Component } from 'react'; import { StyleSheet } from 'react-native'; import { Image, Styles } from 'reactxp'; @@ -9,10 +9,10 @@ export default class Img extends Component { style: Object, tintColor?: string, height?: number, - width?:number, + width?: number, }; - render(){ + render() { const width = this.props.width || 7; const height = this.props.height || 12; const source = this.props.source || 'icon-chevron'; @@ -20,12 +20,24 @@ export default class Img extends Component { if (tintColor === 'currentColor' && this.props.style) { const { color: tint, ...otherStyles } = StyleSheet.flatten(this.props.style); - return( - <Image style={Styles.createViewStyle({ ...otherStyles, tintColor: tint, height: height, width: width }, false)} source={ source }/> + return ( + <Image + style={Styles.createViewStyle( + { ...otherStyles, tintColor: tint, height: height, width: width }, + false, + )} + source={source} + /> ); } else { - return( - <Image style={Styles.createViewStyle({ ...this.props.style, height: height, width: width }, false)} source={ source }/> + return ( + <Image + style={Styles.createViewStyle( + { ...this.props.style, height: height, width: width }, + false, + )} + source={source} + /> ); } } |
