简体   繁体   English

本机基本更改floatlabel输入底部轮廓颜色

[英]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 我试图更改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. 并尝试在Input.js中手动添加边框,但无法正常工作。 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”内添加borderColor:{}

".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/>的样式

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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