diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2018-07-16 16:58:55 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2018-07-16 16:58:55 +0200 |
| commit | 3483bea5716b608cb04dc2d006595c8dbf0dfd6d (patch) | |
| tree | 8499c2a2487d601d2e53cf623b5b7f5d9839a15f /app/lib/styles.js | |
| parent | 7aa861495ffe90e0b5a9b9c67b8ccf0ad62c2882 (diff) | |
| parent | 28425ce96bef4f9cef54673910aeae51237c6714 (diff) | |
| download | mullvadvpn-3483bea5716b608cb04dc2d006595c8dbf0dfd6d.tar.xz mullvadvpn-3483bea5716b608cb04dc2d006595c8dbf0dfd6d.zip | |
Merge branch 'visual-adjustments'
Diffstat (limited to 'app/lib/styles.js')
| -rw-r--r-- | app/lib/styles.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/app/lib/styles.js b/app/lib/styles.js index 4cde4fdfce..0bbec6fe79 100644 --- a/app/lib/styles.js +++ b/app/lib/styles.js @@ -1,25 +1,26 @@ // @flow -import { Styles } from 'reactxp'; +import * as RX from 'reactxp'; -type ExtractReturnType = (*) => Object; +type ExtractViewReturnType = <V>(V) => Object; +type ExtractTextReturnType = <V>(V) => Object; export function createViewStyles<T: { [string]: Object }>( styles: T, -): $ObjMap<T, ExtractReturnType> { +): $ObjMap<T, ExtractViewReturnType> { const viewStyles = {}; for (const style of Object.keys(styles)) { - viewStyles[style] = Styles.createViewStyle(styles[style]); + viewStyles[style] = RX.Styles.createViewStyle(styles[style]); } return viewStyles; } export function createTextStyles<T: { [string]: Object }>( styles: T, -): $ObjMap<T, ExtractReturnType> { +): $ObjMap<T, ExtractTextReturnType> { const textStyles = {}; for (const style of Object.keys(styles)) { - textStyles[style] = Styles.createTextStyle(styles[style]); + textStyles[style] = RX.Styles.createTextStyle(styles[style]); } return textStyles; } |
