简体   繁体   中英

Native Base change floatlabel input bottom outline color

在此处输入图片说明

I am using react native with native base theme engine. I customized most of the native base elements. I am trying to change the color of border which i pointed in above picture.

I tried to change in components/Item.js

".floatingLabel": {
  "NativeBase.Input": {
    height: 50,
    top: 8,
   borderColor: 'red'
  },
  "NativeBase.Label": {
    top: 8
  },
  "NativeBase.Icon": {
    top: 6
  }
},

And tried to add border manually in Input.js but its not working. There is not much of help online for this. Is this possible?

If you want to change bottom border color of all floating label Items, add borderColor inside ".floatingLabel":{}

".floatingLabel": {
  "NativeBase.Input": {
    height: 50,
    top: 8
  },
  "NativeBase.Label": {
    top: 8
  },
  "NativeBase.Icon": {
    top: 6
  },
  borderColor: "blue"
},

For a single item just override the style of the <Item/>

<Item floatingLabel style={{ borderColor:"blue" }}>
     <Label>Username</Label>
     <Input />
</Item>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM