Nativebase: Trying to add an Image on the right of a Label. It's working fine with stackedlabel but floating label is making the image dissappear

Created on 13 Sep 2018  路  1Comment  路  Source: GeekyAnts/NativeBase

Here's my code and screenshots

import React, { Component } from 'react';
import {View, Image} from 'react-native';

import { Label,Item, Input } from 'native-base';

export default class Splash extends Component {
constructor(props){
super(props);
}

render() {
    return (
        <View 
            style={{
                flex:1,
                justifyContent: 'center',
                paddingHorizontal: 20,
                alignItems:'center', 
                backgroundColor:'grey'
            }}>
            <Item>
                <Label style={{color:'black'}}>Email</Label>
                <Input/>
                <Image 
                    source={require('../images/email1.png')}
                    style={{
                        width:70,
                        height:35,
                        resizeMode:'contain'
                    }}/>
            </Item>
        </View>
    )
}

}

simulator screen shot - iphone 6 - 2018-09-13 at 06 40 21

But when I add floating label the image goes away
import React, { Component } from 'react';
import {View, Image} from 'react-native';

import { Label,Item, Input } from 'native-base';

export default class Splash extends Component {
constructor(props){
super(props);
}

render() {
    return (
        <View 
            style={{
                flex:1,
                justifyContent: 'center',
                paddingHorizontal: 20,
                alignItems:'center', 
                backgroundColor:'grey'
            }}>
            <Item floatingLabel>
                <Label style={{color:'black'}}>Email</Label>
                <Input/>
                <Image 
                    source={require('../images/email1.png')}
                    style={{
                        width:70,
                        height:35,
                        resizeMode:'contain'
                    }}/>
            </Item>
        </View>
    )
}

}

simulator screen shot - iphone 6 - 2018-09-13 at 06 40 54

Most helpful comment

Added Thumbnail support for floatingLabel, commit https://github.com/GeekyAnts/NativeBase/commit/2e4d41483dd15e3f3e871b2c1a995c8d3a466fcb

Also available on master

Quick demo

floatinglabel

>All comments

Added Thumbnail support for floatingLabel, commit https://github.com/GeekyAnts/NativeBase/commit/2e4d41483dd15e3f3e871b2c1a995c8d3a466fcb

Also available on master

Quick demo

floatinglabel

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mcpracht picture mcpracht  路  3Comments

Bundas picture Bundas  路  3Comments

natashache picture natashache  路  3Comments

muthuraman007 picture muthuraman007  路  3Comments

georgemickael-b picture georgemickael-b  路  3Comments