删除原生基础中 <Form> 组件中的左间距

Syd*_*ria 3 react-native native-base

我想问一下,如何删除 Form 组件中的左侧间距,我的设计使用本机基本 UI。这是我的代码如下:

<Form>
  <Item style={styles.loginInputItem}>
    <Input placeholder="Email address" style={styles.loginInput} placeholderTextColor="#FFFFFF" />
  </Item>
  <Item style={styles.loginInputItem}>
    <Input placeholder="Password" secureTextEntry={true} style={styles.loginInput} placeholderTextColor="#FFFFFF" />
  </Item>
  <Button block style={styles.loginButton}>
    <Text>Login</Text>
  </Button>
  <Button block style={styles.loginFacebookButton}>
    <Text>Connect with Facebook</Text>
  </Button>
  <Button block style={styles.loginGoogleButton}>
    <Text style={styles.loginGoogleButtonText}>Connect with Google</Text>
  </Button>
  <Button block transparent light>
    <Text>Forgot Password?</Text>
  </Button>
</Form>
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

akh*_*ier 5

只需覆盖样式<Item/>并设置marginLeft:0

<Item style={{ marginLeft: 0 }}/>
Run Code Online (Sandbox Code Playgroud)