Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 #2271

Closed
sourabhdadapure opened this issue Sep 13, 2018 · 1 comment

Comments

@sourabhdadapure
Copy link

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

@SupriyaKalghatgi
Copy link
Contributor

Added Thumbnail support for floatingLabel, commit 2e4d414

Also available on master

Quick demo

floatinglabel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants