diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2018-08-08 18:36:14 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2018-08-08 19:05:27 +0200 |
| commit | 9b5052b43c95af483da07c72c7d6234aa848a725 (patch) | |
| tree | 2439b2fc2624aae141c976186a13333e3a373def /app/components/Cell.js | |
| parent | 8d3f558cb9621c41c5962761eb58025fb4898c62 (diff) | |
| download | mullvadvpn-9b5052b43c95af483da07c72c7d6234aa848a725.tar.xz mullvadvpn-9b5052b43c95af483da07c72c7d6234aa848a725.zip | |
Remove styles helpers, instead use RX.Styles directly
Diffstat (limited to 'app/components/Cell.js')
| -rw-r--r-- | app/components/Cell.js | 80 |
1 files changed, 38 insertions, 42 deletions
diff --git a/app/components/Cell.js b/app/components/Cell.js index 80b783352f..0fd4de40e6 100644 --- a/app/components/Cell.js +++ b/app/components/Cell.js @@ -1,53 +1,49 @@ // @flow import * as React from 'react'; -import { Button, Text, Component, Types } from 'reactxp'; +import { Button, Text, Component, Styles, Types } from 'reactxp'; import Img from './Img'; -import { createViewStyles, createTextStyles } from '../lib/styles'; import { colors } from '../config'; const styles = { - ...createViewStyles({ - cell: { - backgroundColor: colors.blue, - paddingTop: 14, - paddingBottom: 14, - paddingLeft: 16, - paddingRight: 16, - marginBottom: 1, - flex: 1, - flexDirection: 'row', - alignItems: 'center', - alignContent: 'center', - cursor: 'default', - }, - cellHover: { - backgroundColor: colors.blue80, - }, - icon: { - color: colors.white60, - marginLeft: 8, - }, + cell: Styles.createViewStyle({ + backgroundColor: colors.blue, + paddingTop: 14, + paddingBottom: 14, + paddingLeft: 16, + paddingRight: 16, + marginBottom: 1, + flex: 1, + flexDirection: 'row', + alignItems: 'center', + alignContent: 'center', + cursor: 'default', }), - ...createTextStyles({ - label: { - color: colors.white, - alignSelf: 'center', - fontFamily: 'DINPro', - fontSize: 20, - fontWeight: '900', - lineHeight: 26, - flex: 1, - marginLeft: 8, - }, - subtext: { - color: colors.white60, - fontFamily: 'Open Sans', - fontSize: 13, - fontWeight: '800', - flex: 0, - textAlign: 'right', - }, + cellHover: Styles.createViewStyle({ + backgroundColor: colors.blue80, + }), + icon: Styles.createViewStyle({ + color: colors.white60, + marginLeft: 8, + }), + + label: Styles.createTextStyle({ + color: colors.white, + alignSelf: 'center', + fontFamily: 'DINPro', + fontSize: 20, + fontWeight: '900', + lineHeight: 26, + flex: 1, + marginLeft: 8, + }), + subtext: Styles.createTextStyle({ + color: colors.white60, + fontFamily: 'Open Sans', + fontSize: 13, + fontWeight: '800', + flex: 0, + textAlign: 'right', }), }; |
