summaryrefslogtreecommitdiffhomepage
path: root/app/components
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2018-01-03 12:30:00 +0100
committerAndrej Mihajlov <and@mullvad.net>2018-01-08 14:31:20 +0100
commitb2ae7d5648316f24c1d00d04ce722ab6bddc2f58 (patch)
tree5e2f07c339f108b70989d0aa7d148be09eaa4ec6 /app/components
parentff84229de6ff696d31bc40e6e08ecb14fbd789ce (diff)
downloadmullvadvpn-b2ae7d5648316f24c1d00d04ce722ab6bddc2f58.tar.xz
mullvadvpn-b2ae7d5648316f24c1d00d04ce722ab6bddc2f58.zip
Use createXXXStyles helpers
Diffstat (limited to 'app/components')
-rw-r--r--app/components/HeaderBarStyles.js123
1 files changed, 58 insertions, 65 deletions
diff --git a/app/components/HeaderBarStyles.js b/app/components/HeaderBarStyles.js
index bc7b982a41..c2d53a2036 100644
--- a/app/components/HeaderBarStyles.js
+++ b/app/components/HeaderBarStyles.js
@@ -1,69 +1,62 @@
// @flow
-import { Styles } from 'reactxp';
+import { createTextStyles, createViewStyles } from '../lib/styles';
-const styles = {
- headerbar:
- Styles.createViewStyle({
- paddingTop: 12,
- paddingBottom: 12,
- paddingLeft: 12,
- paddingRight: 12,
- backgroundColor: '#294D73',
- flexDirection: 'row',
- justifyContent: 'space-between',
- alignItems: 'center',
- }),
- headerbar__hidden:
- Styles.createViewStyle({
- paddingTop: 24,
- paddingBottom: 0,
- paddingLeft: 0,
- paddingRight: 0,
- }),
- headerbar__darwin: Styles.createViewStyle({
- paddingTop: 24,
- }),
- headerbar__style_defaultDark:
- Styles.createViewStyle({
- backgroundColor: '#192E45',
- }),
- headerbar__style_error:
- Styles.createViewStyle({
- backgroundColor: '#D0021B',
- }),
- headerbar__style_success:
- Styles.createViewStyle({
- backgroundColor: '#44AD4D',
- }),
- headerbar__container:
- Styles.createViewStyle({
- display: 'flex',
- flexDirection: 'row',
- alignItems: 'center',
- }),
- headerbar__title:
- Styles.createTextStyle({
- fontFamily: 'DINPro',
- fontSize: 24,
- fontWeight: '900',
- lineHeight: 30,
- letterSpacing: -0.5,
- color: 'rgba(255,255,255,0.6)',
- marginLeft: 8,
- }),
- headerbar__logo:
- Styles.createViewStyle({
- height: 50,
- width: 50,
- }),
- headerbar__settings: {
- padding: 0
- },
- headerbar__settings_icon:
- Styles.createViewStyle({
- width: 24,
- height: 24,
+export default {
+ ...createViewStyles({
+ headerbar: {
+ paddingTop: 12,
+ paddingBottom: 12,
+ paddingLeft: 12,
+ paddingRight: 12,
+ backgroundColor: '#294D73',
+ flexDirection: 'row',
+ justifyContent: 'space-between',
+ alignItems: 'center',
+ },
+ headerbar__hidden: {
+ paddingTop: 24,
+ paddingBottom: 0,
+ paddingLeft: 0,
+ paddingRight: 0,
+ },
+ headerbar__darwin: {
+ paddingTop: 24,
+ },
+ headerbar__style_defaultDark: {
+ backgroundColor: '#192E45',
+ },
+ headerbar__style_error: {
+ backgroundColor: '#D0021B',
+ },
+ headerbar__style_success: {
+ backgroundColor: '#44AD4D',
+ },
+ headerbar__container: {
+ display: 'flex',
+ flexDirection: 'row',
+ alignItems: 'center',
+ },
+ headerbar__logo: {
+ height: 50,
+ width: 50,
+ },
+ headerbar__settings: {
+ padding: 0
+ },
+ headerbar__settings_icon: {
+ width: 24,
+ height: 24,
+ },
}),
+ ...createTextStyles({
+ headerbar__title: {
+ fontFamily: 'DINPro',
+ fontSize: 24,
+ fontWeight: '900',
+ lineHeight: 30,
+ letterSpacing: -0.5,
+ color: 'rgba(255,255,255,0.6)',
+ marginLeft: 8,
+ }
+ })
};
-
-module.exports = styles;