原生基础中的多个输入 [英] multiple inputs in native base

查看:41
本文介绍了原生基础中的多个输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 React Native 项目并使用native-base".我想要这样的输入

I have a project in react native and use "native-base". I want to have inputs like this

有人可以帮忙吗?

推荐答案

可能对您的需求有所帮助

import React, { Component } from "react";
import { Container, Header, Content, Item, Input } from "native-base";
export default class RoundedTextboxExample extends Component {
render() {
return (
  <Container>
    <Header />
    <Content
      contentContainerStyle={{
        flexDirection: "row",
        justifyContent: "space-between",
        marginTop: 20,
        borderColor: "black",
        borderWidth: 3,
        margin: 2,
        padding: 20
      }}
    >
      <Item rounded style={{ width: "23%", borderColor: "red" }}>
        <Input placeholder="Rounded" />
      </Item>
      <Item rounded style={{ width: "23%" }}>
        <Input placeholder="Rounded" />
      </Item>
      <Item rounded style={{ width: "23%" }}>
        <Input placeholder="Rounded" />
      </Item>
      <Item rounded style={{ width: "23%" }}>
        <Input placeholder="Rounded" />
      </Item>
    </Content>
  </Container>
);
}
}

这篇关于原生基础中的多个输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆