Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. class App extends React.Component {
  2. constructor(props) {
  3. super(props);
  4. this.state = {
  5. myVariable: '',
  6. open: false
  7. };
  8. }
  9.  
  10. drawerContent = () => {
  11. return (
  12. <Menu>
  13. <TextField>Oop</TextField>
  14. </Menu>
  15. );
  16. };
  17.  
  18. toggleOpen = () => {
  19. this.setState({ open: !this.state.open });
  20. };
  21.  
  22. static navigationOptions = ({navigation}) => {
  23. return {
  24. title: 'Hom',
  25. headerLeft: navigation.state.params ? navigation.state.params.headerLeft : null,
  26. headerStyle: {
  27. backgroundColor: '#f4511e',
  28. },
  29. headerTintColor: '#fff',
  30. headerTitleStyle: {
  31. fontWeight: 'bold',
  32. },
  33. }
  34. };
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41. componentDidMount() {
  42. const { navigation } = this.props;
  43. navigation.setParams({
  44. headerLeft: (
  45. <Icon name='menu' onPress={this.toggleOpen} />
  46. ),
  47. })
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement