缩减基本输入行的长度

问题描述 投票:0回答:1

我在我的应用程序中使用了这个功能。

<Item fixedLabel>
              <Input style={{ width: 0.5 }}/>
            </Item>

固定标签线的长度延伸到了整个屏幕。我怎样才能减小它的大小?我已经尝试过使用 widthpaddingLeft/right但这并没有任何区别。

javascript css typescript react-native native-base
1个回答
1
投票

把它包在一个div里面,然后给div添加样式。

<div className='cusmtomClass'>
  <Item fixedLabel>
    <Input style={{ width: 0.5 }}/>
  </Item>
</div>
© www.soinside.com 2019 - 2024. All rights reserved.