mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-29 05:00:43 +10:00
Rename TextFieldOneLiner -> LabeledField
This commit is contained in:
parent
fd23d20ef2
commit
b0bc3ac8d9
4 changed files with 10 additions and 10 deletions
|
|
@ -2,9 +2,9 @@ import React, { PropTypes } from 'react';
|
|||
import { Field } from 'redux-form';
|
||||
import { Input } from '../../components';
|
||||
|
||||
import css from './TextFieldOneLiner.css';
|
||||
import css from './LabeledField.css';
|
||||
|
||||
const TextFieldOneLiner = props => {
|
||||
const LabeledField = props => {
|
||||
const { label, name, type } = props;
|
||||
|
||||
return (
|
||||
|
|
@ -15,16 +15,16 @@ const TextFieldOneLiner = props => {
|
|||
);
|
||||
};
|
||||
|
||||
TextFieldOneLiner.defaultProps = {
|
||||
LabeledField.defaultProps = {
|
||||
type: 'input',
|
||||
};
|
||||
|
||||
const { string } = PropTypes;
|
||||
|
||||
TextFieldOneLiner.propTypes = {
|
||||
LabeledField.propTypes = {
|
||||
label: string.isRequired,
|
||||
name: string.isRequired,
|
||||
type: string,
|
||||
};
|
||||
|
||||
export default TextFieldOneLiner;
|
||||
export default LabeledField;
|
||||
|
|
@ -21,7 +21,7 @@ import PageLayout from './PageLayout/PageLayout';
|
|||
import Promised from './Promised/Promised';
|
||||
import RoutesProvider from './RoutesProvider/RoutesProvider';
|
||||
import SearchResultsPanel from './SearchResultsPanel/SearchResultsPanel';
|
||||
import TextFieldOneLiner from './TextFieldOneLiner/TextFieldOneLiner';
|
||||
import LabeledField from './LabeledField/LabeledField';
|
||||
|
||||
export {
|
||||
AddImages,
|
||||
|
|
@ -47,5 +47,5 @@ export {
|
|||
Promised,
|
||||
RoutesProvider,
|
||||
SearchResultsPanel,
|
||||
TextFieldOneLiner,
|
||||
LabeledField,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
import { reduxForm, propTypes as formPropTypes } from 'redux-form';
|
||||
import { Button, TextFieldOneLiner } from '../../components';
|
||||
import { Button, LabeledField } from '../../components';
|
||||
|
||||
import css from './LoginForm.css';
|
||||
|
||||
|
|
@ -10,10 +10,10 @@ const LoginForm = props => {
|
|||
<form className={css.form} onSubmit={handleSubmit}>
|
||||
<div>
|
||||
<div className={css.row}>
|
||||
<TextFieldOneLiner name="email" type="email" label="Email" />
|
||||
<LabeledField name="email" type="email" label="Email" />
|
||||
</div>
|
||||
<div className={css.row}>
|
||||
<TextFieldOneLiner name="password" type="password" label="Password" />
|
||||
<LabeledField name="password" type="password" label="Password" />
|
||||
</div>
|
||||
</div>
|
||||
<Button className={css.button} type="submit" disabled={pristine || submitting}>Log in</Button>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue