summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer/components/Layout.tsx
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2020-04-28 15:01:42 +0200
committerOskar Nyberg <oskar@mullvad.net>2020-04-28 15:01:42 +0200
commite90dcd38409bb69c0b649142f85a8bddaaccef37 (patch)
tree6da5cafc0c67dfc4d95f4a61f2d7bfc7afa457f9 /gui/src/renderer/components/Layout.tsx
parentf732c379f77bc7379787b1e0c780118e7870b98a (diff)
parent2243c98b5c870037dd47bf16573fc27f22c98a39 (diff)
downloadmullvadvpn-e90dcd38409bb69c0b649142f85a8bddaaccef37.tar.xz
mullvadvpn-e90dcd38409bb69c0b649142f85a8bddaaccef37.zip
Merge branch 'styled-components-experimentation'
Diffstat (limited to 'gui/src/renderer/components/Layout.tsx')
-rw-r--r--gui/src/renderer/components/Layout.tsx31
1 files changed, 15 insertions, 16 deletions
diff --git a/gui/src/renderer/components/Layout.tsx b/gui/src/renderer/components/Layout.tsx
index 01f4aa701d..825cbf9190 100644
--- a/gui/src/renderer/components/Layout.tsx
+++ b/gui/src/renderer/components/Layout.tsx
@@ -1,5 +1,7 @@
import * as React from 'react';
import { Component, View } from 'reactxp';
+import styled from 'styled-components';
+import { colors } from '../../config.json';
import HeaderBar from './HeaderBar';
import styles from './LayoutStyles';
@@ -15,20 +17,17 @@ export class Header extends Component<HeaderBar['props']> {
}
}
-interface IContainerProps {
- children: React.ReactNode;
-}
-export class Container extends Component<IContainerProps> {
- public render() {
- return <View style={styles.container}>{this.props.children}</View>;
- }
-}
+export const Container = styled.div({
+ display: 'flex',
+ flexDirection: 'column',
+ flex: 1,
+ backgroundColor: colors.blue,
+ overflow: 'hidden',
+});
-interface ILayoutProps {
- children: React.ReactNode;
-}
-export class Layout extends Component<ILayoutProps> {
- public render() {
- return <View style={styles.layout}>{this.props.children}</View>;
- }
-}
+export const Layout = styled.div({
+ display: 'flex',
+ flexDirection: 'column',
+ flex: 1,
+ height: '100vh',
+});