Skip to content

Error when importing react-native image-button #4

@ghost

Description

I get the following error message when importing react-native image button. I have installed and linked to React Native.

simulator screen shot - iphone 6 - 2017-10-09 at 16 55 07

Any help would be appreciated as I would really like to use this button.

import React, { Component } from 'react';
import { AppRegistry, StyleSheet, View, FlatList, Image, TouchableHighlight} from 'react-native';

import { TabNavigator, StackNavigator } from 'react-navigation';

import ImageButton from 'react-native-img-button';

import { Container, Content, Header, Left, Body, Right, Button, Icon, Title, Text, List, ListItem, Thumbnail } from 'native-base';

import Realm from 'realm';

class identifyWizard extends React.Component {
      constructor(){
    super(props);
  }
    static navigationOptions = {
tabBarLabel: 'Identify Wizard',
    tabBarIcon: ({ tintColor }) => (
    <Image
        source={require('./assets/identify.png')}
        style={[styles.icon, {tintColor: tintColor}]}
      />
),
  };

 onPressButton() {
    console.log("Pressed!");
  }

  render() {
      
    return(
        <Container>
                <Header style={styles.header}>
          <Left>
          </Left>
          <Body>
            <Title>Identify Wizard</Title>
          </Body>
          <Right>
          </Right>
        </Header>
        <ImageButton
          style={ styles.btn }
          appearance={ {
            normal: require("./assets/smooth.png"),
            highlight: require("./assets/smoothGreen.png")
          } }
          onPress={ this.onPressButton }/>
        </Container>
);
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions