Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class App extends React.Component {
- constructor(props) {
- super(props);
- this.state = {
- myVariable: '',
- open: false
- };
- }
- drawerContent = () => {
- return (
- <Menu>
- <TextField>Oop</TextField>
- </Menu>
- );
- };
- toggleOpen = () => {
- this.setState({ open: !this.state.open });
- };
- static navigationOptions = ({navigation}) => {
- return {
- title: 'Hom',
- headerLeft: navigation.state.params ? navigation.state.params.headerLeft : null,
- headerStyle: {
- backgroundColor: '#f4511e',
- },
- headerTintColor: '#fff',
- headerTitleStyle: {
- fontWeight: 'bold',
- },
- }
- };
- componentDidMount() {
- const { navigation } = this.props;
- navigation.setParams({
- headerLeft: (
- <Icon name='menu' onPress={this.toggleOpen} />
- ),
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement