From 8b58d156ef9a041634ec42b87265dbe894735d2b Mon Sep 17 00:00:00 2001 From: Pavlo Aksonov Date: Fri, 27 Jul 2018 14:25:59 +0200 Subject: [PATCH] fix Example --- Example/Example.js | 12 ++++++------ Example/components/TabView.js | 13 ++++--------- Example/components/drawer/DrawerContent.js | 6 ++---- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/Example/Example.js b/Example/Example.js index e4461426c..3b2cd6442 100644 --- a/Example/Example.js +++ b/Example/Example.js @@ -89,20 +89,20 @@ const Example = () => ( > alert('Right button')} rightTitle="Right" /> - + Right} /> - alert('onBack button!')} hideDrawerButton backTitle="Back!" panHandlers={null} /> + alert('onBack button!')} hideDrawerButton backTitle="Back!" panHandlers={null} /> - - {}} /> + + {}} /> - - + + diff --git a/Example/components/TabView.js b/Example/components/TabView.js index 7a2361bfc..600980e39 100644 --- a/Example/components/TabView.js +++ b/Example/components/TabView.js @@ -1,14 +1,12 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { - StyleSheet, Text, View, ViewPropTypes, -} from 'react-native'; +import { StyleSheet, Text, View, ViewPropTypes } from 'react-native'; import Button from 'react-native-button'; import { Actions } from 'react-native-router-flux'; const propTypes = { name: PropTypes.string.isRequired, - data: PropTypes.string.isRequired, + data: PropTypes.string, sceneStyle: ViewPropTypes.style, title: PropTypes.string.isRequired, }; @@ -32,10 +30,7 @@ class TabView extends React.Component { state = { hideNavBar: false }; toggleNavBar = () => { - this.setState( - prevState => ({ hideNavBar: !prevState.hideNavBar }), - () => Actions.refresh({ hideNavBar: this.state.hideNavBar }), - ); + this.setState(prevState => ({ hideNavBar: !prevState.hideNavBar }), () => Actions.refresh({ hideNavBar: this.state.hideNavBar })); }; render() { @@ -78,7 +73,7 @@ class TabView extends React.Component {