diff --git a/redux-form/redux-form-tests.tsx b/redux-form/redux-form-tests.tsx new file mode 100644 index 000000000..d7341a199 --- /dev/null +++ b/redux-form/redux-form-tests.tsx @@ -0,0 +1,332 @@ +/// + +import * as React from 'react'; +import {Component, PropTypes} from 'react'; +import {createStore, combineReducers} from 'redux'; +import {reduxForm, reducer as reduxFormReducer, ReduxFormProps} from 'redux-form'; + + +module SimpleForm { + export const fields = ['firstName', 'lastName', 'email', 'sex', 'favoriteColor', 'employed', 'notes']; + + class SimpleForm extends Component { + static propTypes = { + fields: PropTypes.object.isRequired, + handleSubmit: PropTypes.func.isRequired, + resetForm: PropTypes.func.isRequired, + submitting: PropTypes.bool.isRequired + }; + + render() { + const { + fields: {firstName, lastName, email, sex, favoriteColor, employed, notes}, + handleSubmit, + resetForm, + submitting + } = this.props; + return (
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + +
+
+
+ +
+ +
+
+
+ +
+
+ +
+