diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-07-26 12:21:20 -0300 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-07-26 12:21:20 -0300 |
| commit | d120021305aeb01ce106e3c1e8a53a5295424ccb (patch) | |
| tree | 3049efa67741df389d32acaa6ab83ee0bc63f1f7 /app/components/SettingsHeader.js | |
| parent | 405ff3c747f8847f1a777b5267906aba6c35d1df (diff) | |
| parent | 84703044ec321ee9782984ef033ee4b88e442cbb (diff) | |
| download | mullvadvpn-d120021305aeb01ce106e3c1e8a53a5295424ccb.tar.xz mullvadvpn-d120021305aeb01ce106e3c1e8a53a5295424ccb.zip | |
Merge branch 'drag-settings'
Diffstat (limited to 'app/components/SettingsHeader.js')
| -rw-r--r-- | app/components/SettingsHeader.js | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/app/components/SettingsHeader.js b/app/components/SettingsHeader.js new file mode 100644 index 0000000000..c1791d6fc0 --- /dev/null +++ b/app/components/SettingsHeader.js @@ -0,0 +1,61 @@ +// @flow + +import * as React from 'react'; +import { Component, Text, View, Styles } from 'reactxp'; +import { colors } from '../config'; + +const styles = { + header: { + default: Styles.createViewStyle({ + flexGrow: 0, + flexShrink: 0, + flexBasis: 'auto', + paddingTop: 16, + paddingRight: 24, + paddingLeft: 24, + paddingBottom: 24, + }), + linux: Styles.createViewStyle({ + WebkitAppRegion: 'drag', + }), + }, + title: Styles.createTextStyle({ + fontFamily: 'DINPro', + fontSize: 32, + fontWeight: '900', + lineHeight: 40, + color: colors.white, + }), + subtitle: Styles.createTextStyle({ + marginTop: 4, + fontFamily: 'Open Sans', + fontSize: 13, + fontWeight: '600', + overflow: 'visible', + color: colors.white80, + lineHeight: 20, + letterSpacing: -0.2, + }), +}; + +export default class SettingsHeader extends Component { + render() { + return ( + <View style={[styles.header.default, styles.header[process.platform], this.props.style]}> + {this.props.children} + </View> + ); + } +} + +export class HeaderTitle extends Component { + render() { + return <Text style={[styles.title]}>{this.props.children}</Text>; + } +} + +export class HeaderSubTitle extends Component { + render() { + return <Text style={[styles.subtitle]}>{this.props.children}</Text>; + } +} |
