Can not render element?
Opened this issue · 1 comments
yuanzhaocyc commented
<Text>test</Text>
can render,but Form can not.
my code:
import React, { Component } from 'react'
import { reduxForm } from 'redux-form'
import {
ActionsContainer,
Button,
FieldsContainer,
Fieldset,
Form,
FormGroup,
Label,
} from 'react-native-clean-form'
import {
Input,
Switch
} from 'react-native-clean-form/redux-form'
import { View,Text,Image } from 'react-native'
class ContactForm extends Component {
constructor(props){
super(props);
}
render(){
const {handleSubmit, authenticate, submitting} = this.props;
return (
<View>
<Text>test</Text>
<Form>
<FieldsContainer>
<Fieldset label="Contact details">
<Input inlineLabel={false} name="first_name" label="First name" placeholder="John" />
<Input inlineLabel={false} name="email" label="Email" placeholder="something@domain.com" />
</Fieldset>
<Fieldset label="Shipping details" last>
<Input inlineLabel={false} name="password" label="Address" placeholder="Hejrevej 33" />
<Input inlineLabel={false} name="password_repeat" label="City" placeholder="Copenhagen" />
<Switch inlineLabel={false} label="Save my details" border={false} name="save_details" />
</Fieldset>
</FieldsContainer>
<ActionsContainer>
<Button icon="md-checkmark" iconPlacement="right" onPress={()=>{this.props.onSubmit}} submitting={submitting}>Save</Button>
</ActionsContainer>
</Form>
</View>
)
}
}
ContactForm = reduxForm({
form: 'Form'
})(ContactForm)
yuanzhaocyc commented
it's ok to give the form a width and height,but why not styled?