NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

icon color not working Form item floating labels

Open iiitmahesh opened this issue 9 years ago • 8 comments

icon color not working Form item floating labels

I have checked in mobile inspector, it is (icon) showing color #000

`import {Container, Badge,Text, Button, Content, Form, Item, Input , Label,Icon} from 'native-base';`
<View style={[ styles.bg]}>
    <Form>
        <Item floatingLabel>
            <Icon style={{color: '#fff'}} name='ios-person-outline' />
            <Label>Username</Label>
            <Input />
        </Item>
        <Item floatingLabel>
            <Icon style={{color: '#fff'}} name='ios-lock-outline' />
            <Label>Password</Label>
            <Input />
        </Item>
    </Form>
</View>

iiitmahesh avatar Mar 11 '17 09:03 iiitmahesh

non floating form item working fine, only floating variable not working

<Form>
    <Item>
        <Icon style={{color: '#fff'}} name='ios-person-outline' />
        <Input placeholder='Username' />
    </Item>
    <Item>
        <Icon style={{color: '#fff'}} name='ios-lock-outline' />
        <Input placeholder='Password' />
        <Input />
    </Item>
</Form>

iiitmahesh avatar Mar 11 '17 09:03 iiitmahesh

Thanks, for reporting. Will be looked into. cc @shivrajkumar

sankhadeeproy007 avatar Mar 13 '17 06:03 sankhadeeproy007

I get this error. :)

iambanh2 avatar Mar 27 '17 03:03 iambanh2

@iambanh2 @iiitmahesh what you guys can do is to add

  '.floatingLabel': {
        'NativeBase.Input': {
          height: 60,
          top: 8,
        },
        'NativeBase.Icon': {
          color:'blue',
        },

        'NativeBase.Label': {
          top: 8,
        },
      },

in the native-base-theme/components/Item.js It worked for me .Give it a try .

geekrishabh avatar Apr 13 '17 16:04 geekrishabh

@shivrajkumar I am still getting this issue. Icon not appearing when using floating label. my configuration is as follows:

"native-base": "2.2.0",
"react": "16.0.0-alpha.12",
"react-native": "0.45.1",

AggarwalAnkit avatar Aug 25 '17 22:08 AggarwalAnkit

@GeekRishabh your solution also didn't work for me. I am new to react-native. Can someone please help me with this issue. @shivrajkumar can you reopen this issue?

AggarwalAnkit avatar Sep 05 '17 06:09 AggarwalAnkit

Same issue for me. color prop is not working in floating label. Is there any solution?

crazydev71 avatar Sep 07 '17 04:09 crazydev71

@crazydev71 for now I am writing Icon component outside the Item component and that is working fine.

AggarwalAnkit avatar Sep 07 '17 05:09 AggarwalAnkit