summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2018-07-23 17:48:39 +0200
committerAndrej Mihajlov <and@mullvad.net>2018-07-23 17:48:39 +0200
commit5cafc4510eb2a1998d910647d39518a5048b9e18 (patch)
tree8a74b8a486b0f6b1a074b923c155d6aa0f4e8f6b
parentd258c7614f6c41c6f78939e9d47edff2d44af19f (diff)
parentc33954384aaad13fbc8610e46431b4d041ce0a31 (diff)
downloadmullvadvpn-5cafc4510eb2a1998d910647d39518a5048b9e18.tar.xz
mullvadvpn-5cafc4510eb2a1998d910647d39518a5048b9e18.zip
Merge branch 'remove-headerbar-hidden'
-rw-r--r--app/components/HeaderBar.js16
-rw-r--r--app/components/HeaderBarStyles.js6
-rw-r--r--test/components/HeaderBar.spec.js16
3 files changed, 4 insertions, 34 deletions
diff --git a/app/components/HeaderBar.js b/app/components/HeaderBar.js
index fcd7d40733..a46856eb46 100644
--- a/app/components/HeaderBar.js
+++ b/app/components/HeaderBar.js
@@ -10,7 +10,6 @@ import platformStyles from './HeaderBarPlatformStyles';
export type HeaderBarStyle = 'default' | 'defaultDark' | 'error' | 'success';
export type HeaderBarProps = {
style: HeaderBarStyle,
- hidden: boolean,
showSettings: boolean,
onSettings: ?() => void,
};
@@ -18,7 +17,6 @@ export type HeaderBarProps = {
export default class HeaderBar extends Component<HeaderBarProps> {
static defaultProps: HeaderBarProps = {
style: 'default',
- hidden: false,
showSettings: false,
onSettings: null,
};
@@ -30,18 +28,12 @@ export default class HeaderBar extends Component<HeaderBarProps> {
styles['style_' + this.props.style],
];
- if (this.props.hidden) {
- containerClass.push(styles['hidden']);
- }
-
return (
<View style={containerClass}>
- {!this.props.hidden ? (
- <View style={styles.container} testName="headerbar__container">
- <Img height={50} width={50} source="logo-icon" />
- <Text style={styles.title}>MULLVAD VPN</Text>
- </View>
- ) : null}
+ <View style={styles.container} testName="headerbar__container">
+ <Img height={50} width={50} source="logo-icon" />
+ <Text style={styles.title}>MULLVAD VPN</Text>
+ </View>
{this.props.showSettings ? (
<Button
diff --git a/app/components/HeaderBarStyles.js b/app/components/HeaderBarStyles.js
index 5b869bc36b..7d3c94cdc9 100644
--- a/app/components/HeaderBarStyles.js
+++ b/app/components/HeaderBarStyles.js
@@ -14,12 +14,6 @@ export default {
justifyContent: 'space-between',
alignItems: 'center',
},
- hidden: {
- paddingTop: 24,
- paddingBottom: 0,
- paddingLeft: 0,
- paddingRight: 0,
- },
style_defaultDark: {
backgroundColor: colors.darkBlue,
},
diff --git a/test/components/HeaderBar.spec.js b/test/components/HeaderBar.spec.js
index a8eca00d53..09eab134ad 100644
--- a/test/components/HeaderBar.spec.js
+++ b/test/components/HeaderBar.spec.js
@@ -5,22 +5,6 @@ import { shallow } from 'enzyme';
import HeaderBar from '../../app/components/HeaderBar';
describe('components/HeaderBar', () => {
- it('should display headerbar', () => {
- const component = render({
- hidden: false,
- });
- const hasChildMatching = hasChild(component, 'headerbar__container');
- expect(hasChildMatching).to.be.true;
- });
-
- it('should not display headerbar', () => {
- const component = render({
- hidden: true,
- });
- const hasChildMatching = hasChild(component, 'headerbar__container');
- expect(hasChildMatching).to.be.false;
- });
-
it('should display settings button', () => {
const component = render({
showSettings: true,