summaryrefslogtreecommitdiffhomepage
path: root/app/components/Layout.js
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2018-04-16 12:01:39 +0200
committerAndrej Mihajlov <and@mullvad.net>2018-04-16 12:01:39 +0200
commitc92ea97d9180fe05ab1adb35a4af0bcb19b12ec9 (patch)
treeddd20a989d7c5b0fc9cae12724970d69976f889c /app/components/Layout.js
parentc9f2ec62790a62e674b1252a6a18dec451d17bf3 (diff)
parent898dd74e5ac86dac2638dc26975b22a9fb0392d4 (diff)
downloadmullvadvpn-c92ea97d9180fe05ab1adb35a4af0bcb19b12ec9.tar.xz
mullvadvpn-c92ea97d9180fe05ab1adb35a4af0bcb19b12ec9.zip
Merge branch 'rn-compatibility'
Diffstat (limited to 'app/components/Layout.js')
-rw-r--r--app/components/Layout.js35
1 files changed, 19 insertions, 16 deletions
diff --git a/app/components/Layout.js b/app/components/Layout.js
index 51b135e8f5..dea641919c 100644
--- a/app/components/Layout.js
+++ b/app/components/Layout.js
@@ -1,46 +1,49 @@
// @flow
import * as React from 'react';
import HeaderBar from './HeaderBar';
+import { View, Component } from 'reactxp';
import type { HeaderBarProps } from './HeaderBar';
-export class Header extends React.Component<HeaderBarProps> {
+import styles from './LayoutStyles';
+
+export class Header extends Component {
+ props: HeaderBarProps;
static defaultProps = HeaderBar.defaultProps;
render() {
return (
- <div className="layout__header">
+ <View style={styles.header}>
<HeaderBar { ...this.props } />
- </div>
+ </View>
);
}
}
+export class Container extends Component {
+ props: {
+ children: React.Node
+ }
-type ContainerProps = {
- children?: React.Element<*>
-};
-
-export class Container extends React.Component<ContainerProps> {
render() {
return (
- <div className="layout__container">
+ <View style={styles.container}>
{ this.props.children }
- </div>
+ </View>
);
}
}
-type LayoutProps = {
- children?: React.Node
-};
+export class Layout extends Component {
+ props: {
+ children: Array<React.Node> | React.Node
+ }
-export class Layout extends React.Component<LayoutProps> {
render() {
return (
- <div className="layout">
+ <View style={styles.layout}>
{ this.props.children }
- </div>
+ </View>
);
}
}