mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-30 18:16:48 +10:00
Rename InputField refs to InputFieldOld
This commit is contained in:
parent
0271f27238
commit
e59514329a
8 changed files with 34 additions and 34 deletions
|
|
@ -2,7 +2,7 @@
|
|||
import React from 'react';
|
||||
import { Field, reduxForm } from 'redux-form';
|
||||
import * as validators from '../../util/validators';
|
||||
import { InputField } from '../../components';
|
||||
import { InputFieldOld } from '../../components';
|
||||
import BirthdayInput from './BirthdayInput';
|
||||
|
||||
const FormComponent = () => {
|
||||
|
|
@ -15,7 +15,7 @@ const FormComponent = () => {
|
|||
format={null}
|
||||
type="custom"
|
||||
inputComponent={BirthdayInput}
|
||||
component={InputField}
|
||||
component={InputFieldOld}
|
||||
validate={required}
|
||||
/>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import React from 'react';
|
|||
import { Field, reduxForm, propTypes as formPropTypes } from 'redux-form';
|
||||
import { Button } from '../../components';
|
||||
import * as validators from '../../util/validators';
|
||||
import InputField from './InputField';
|
||||
import InputFieldOld from './InputFieldOld';
|
||||
|
||||
const FormComponent = props => {
|
||||
const { handleSubmit, pristine, submitting } = props;
|
||||
|
|
@ -18,26 +18,26 @@ const FormComponent = props => {
|
|||
label="Label for required input"
|
||||
placeholder="Placeholder..."
|
||||
validate={required}
|
||||
component={InputField}
|
||||
component={InputFieldOld}
|
||||
/>
|
||||
<Field
|
||||
name="input2"
|
||||
type="text"
|
||||
label="Example input label"
|
||||
placeholder="Example input placeholder..."
|
||||
component={InputField}
|
||||
component={InputFieldOld}
|
||||
/>
|
||||
<Field
|
||||
name="input3"
|
||||
type="text"
|
||||
placeholder="No label in this input..."
|
||||
component={InputField}
|
||||
component={InputFieldOld}
|
||||
/>
|
||||
<Field
|
||||
name="input4"
|
||||
type="text"
|
||||
label="Label for input with initial value"
|
||||
component={InputField}
|
||||
component={InputFieldOld}
|
||||
/>
|
||||
<Field
|
||||
name="textarea1"
|
||||
|
|
@ -45,7 +45,7 @@ const FormComponent = props => {
|
|||
label="Label for textarea"
|
||||
placeholder="Textarea placeholder..."
|
||||
validate={required}
|
||||
component={InputField}
|
||||
component={InputFieldOld}
|
||||
/>
|
||||
<Button type="submit" disabled={submitDisabled} style={buttonStyles}>Submit form</Button>
|
||||
</form>
|
||||
|
|
@ -54,7 +54,7 @@ const FormComponent = props => {
|
|||
|
||||
FormComponent.propTypes = formPropTypes;
|
||||
|
||||
const defaultFormName = 'Styleguide.InputField';
|
||||
const defaultFormName = 'Styleguide.InputFieldOld';
|
||||
|
||||
const Form = reduxForm({
|
||||
form: defaultFormName,
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ import React, { Component, PropTypes } from 'react';
|
|||
import { omit } from 'lodash';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import css from './InputField.css';
|
||||
import css from './InputFieldOld.css';
|
||||
|
||||
class InputField extends Component {
|
||||
class InputFieldOld extends Component {
|
||||
componentWillUnmount() {
|
||||
if (this.props.clearOnUnmount) {
|
||||
this.props.input.onChange('');
|
||||
|
|
@ -73,7 +73,7 @@ class InputField extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
InputField.defaultProps = {
|
||||
InputFieldOld.defaultProps = {
|
||||
rootClassName: null,
|
||||
className: null,
|
||||
inputRootClassName: null,
|
||||
|
|
@ -88,7 +88,7 @@ InputField.defaultProps = {
|
|||
|
||||
const { string, shape, bool, func, oneOfType } = PropTypes;
|
||||
|
||||
InputField.propTypes = {
|
||||
InputFieldOld.propTypes = {
|
||||
// Allow passing in classes to subcomponents
|
||||
rootClassName: string,
|
||||
className: string,
|
||||
|
|
@ -122,4 +122,4 @@ InputField.propTypes = {
|
|||
}).isRequired,
|
||||
};
|
||||
|
||||
export default InputField;
|
||||
export default InputFieldOld;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { Field, reduxForm, propTypes as formPropTypes } from 'redux-form';
|
|||
import { intlShape, injectIntl } from 'react-intl';
|
||||
import classNames from 'classnames';
|
||||
import { maxLength, required } from '../../util/validators';
|
||||
import { Button, InputField } from '../../components';
|
||||
import { Button, InputFieldOld } from '../../components';
|
||||
|
||||
import css from './EditListingDescriptionForm.css';
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ const EditListingDescriptionFormComponent = props => {
|
|||
name="title"
|
||||
label={titleMessage}
|
||||
placeholder={titlePlaceholderMessage}
|
||||
component={InputField}
|
||||
component={InputFieldOld}
|
||||
type="text"
|
||||
validate={[required(titleRequiredMessage), maxLength60Message]}
|
||||
/>
|
||||
|
|
@ -63,7 +63,7 @@ const EditListingDescriptionFormComponent = props => {
|
|||
placeholder={descriptionPlaceholderMessage}
|
||||
className={css.description}
|
||||
type="textarea"
|
||||
component={InputField}
|
||||
component={InputFieldOld}
|
||||
validate={[required(descriptionRequiredMessage)]}
|
||||
/>
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import classNames from 'classnames';
|
|||
import * as propTypes from '../../util/propTypes';
|
||||
import { enhancedField } from '../../util/forms';
|
||||
import { autocompleteSearchRequired, autocompletePlaceSelected } from '../../util/validators';
|
||||
import { LocationAutocompleteInput, Button, InputField } from '../../components';
|
||||
import { LocationAutocompleteInput, Button, InputFieldOld } from '../../components';
|
||||
|
||||
import css from './EditListingLocationForm.css';
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ export class EditListingLocationFormComponent extends Component {
|
|||
name="building"
|
||||
label={buildingMessage}
|
||||
placeholder={buildingPlaceholderMessage}
|
||||
component={InputField}
|
||||
component={InputFieldOld}
|
||||
type="text"
|
||||
/>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React, { PropTypes } from 'react';
|
|||
import { compose } from 'redux';
|
||||
import { FormattedMessage, injectIntl, intlShape } from 'react-intl';
|
||||
import { Field, reduxForm, propTypes as formPropTypes } from 'redux-form';
|
||||
import { InputField, Button } from '../../components';
|
||||
import { InputFieldOld, Button } from '../../components';
|
||||
import * as validators from '../../util/validators';
|
||||
|
||||
import css from './LoginForm.css';
|
||||
|
|
@ -36,14 +36,14 @@ const LoginFormComponent = props => {
|
|||
name="email"
|
||||
type="email"
|
||||
label={emailLabel}
|
||||
component={InputField}
|
||||
component={InputFieldOld}
|
||||
validate={emailRequired}
|
||||
/>
|
||||
<Field
|
||||
name="password"
|
||||
type="password"
|
||||
label={passwordLabel}
|
||||
component={InputField}
|
||||
component={InputFieldOld}
|
||||
validate={passwordRequired}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import {
|
|||
StripeBankAccountToken,
|
||||
Select,
|
||||
BirthdayInput,
|
||||
InputField,
|
||||
InputFieldOld,
|
||||
} from '../../components';
|
||||
import * as validators from '../../util/validators';
|
||||
import { enhancedField } from '../../util/forms';
|
||||
|
|
@ -124,7 +124,7 @@ class PayoutDetailsFormComponent extends Component {
|
|||
type="text"
|
||||
label={streetAddressLabel}
|
||||
placeholder={streetAddressPlaceholder}
|
||||
component={InputField}
|
||||
component={InputFieldOld}
|
||||
validate={streetAddressRequired}
|
||||
clearOnUnmount
|
||||
/>
|
||||
|
|
@ -133,7 +133,7 @@ class PayoutDetailsFormComponent extends Component {
|
|||
type="text"
|
||||
label={postalCodeLabel}
|
||||
placeholder={postalCodePlaceholder}
|
||||
component={InputField}
|
||||
component={InputFieldOld}
|
||||
validate={postalCodeRequired}
|
||||
clearOnUnmount
|
||||
/>
|
||||
|
|
@ -142,7 +142,7 @@ class PayoutDetailsFormComponent extends Component {
|
|||
type="text"
|
||||
label={cityLabel}
|
||||
placeholder={cityPlaceholder}
|
||||
component={InputField}
|
||||
component={InputFieldOld}
|
||||
validate={cityRequired}
|
||||
clearOnUnmount
|
||||
/>
|
||||
|
|
@ -188,14 +188,14 @@ class PayoutDetailsFormComponent extends Component {
|
|||
name="firstName"
|
||||
type="text"
|
||||
label={firstNameLabel}
|
||||
component={InputField}
|
||||
component={InputFieldOld}
|
||||
validate={firstNameRequired}
|
||||
/>
|
||||
<Field
|
||||
name="lastName"
|
||||
type="text"
|
||||
label={lastNameLabel}
|
||||
component={InputField}
|
||||
component={InputFieldOld}
|
||||
validate={lastNameRequired}
|
||||
/>
|
||||
<Field
|
||||
|
|
@ -204,7 +204,7 @@ class PayoutDetailsFormComponent extends Component {
|
|||
format={null}
|
||||
type="custom"
|
||||
inputComponent={BirthdayInput}
|
||||
component={InputField}
|
||||
component={InputFieldOld}
|
||||
validate={birthdayRequired}
|
||||
/>
|
||||
<h2 className={css.subTitle}>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React, { PropTypes } from 'react';
|
|||
import { compose } from 'redux';
|
||||
import { FormattedMessage, injectIntl, intlShape } from 'react-intl';
|
||||
import { Field, reduxForm, propTypes as formPropTypes } from 'redux-form';
|
||||
import { InputField, Button } from '../../components';
|
||||
import { InputFieldOld, Button } from '../../components';
|
||||
import * as validators from '../../util/validators';
|
||||
|
||||
import css from './SignupForm.css';
|
||||
|
|
@ -55,7 +55,7 @@ const SignupFormComponent = props => {
|
|||
type="email"
|
||||
label={emailLabel}
|
||||
validate={emailRequired}
|
||||
component={InputField}
|
||||
component={InputFieldOld}
|
||||
/>
|
||||
<div className={css.name}>
|
||||
<Field
|
||||
|
|
@ -64,7 +64,7 @@ const SignupFormComponent = props => {
|
|||
type="text"
|
||||
label={firstNameLabel}
|
||||
validate={firstNameRequired}
|
||||
component={InputField}
|
||||
component={InputFieldOld}
|
||||
/>
|
||||
<Field
|
||||
className={css.lastNameRoot}
|
||||
|
|
@ -72,7 +72,7 @@ const SignupFormComponent = props => {
|
|||
type="text"
|
||||
label={lastNameLabel}
|
||||
validate={lastNameRequired}
|
||||
component={InputField}
|
||||
component={InputFieldOld}
|
||||
/>
|
||||
</div>
|
||||
<Field
|
||||
|
|
@ -80,7 +80,7 @@ const SignupFormComponent = props => {
|
|||
type="password"
|
||||
label={passwordLabel}
|
||||
validate={passwordRequired}
|
||||
component={InputField}
|
||||
component={InputFieldOld}
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue