mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-29 05:00:43 +10:00
Rename FieldStarRating to FieldReviewRating
This commit is contained in:
parent
9f8ca9a109
commit
b3a754f9e4
7 changed files with 21 additions and 21 deletions
|
|
@ -3,9 +3,9 @@ import React from 'react';
|
|||
import { reduxForm, propTypes as formPropTypes } from 'redux-form';
|
||||
import * as validators from '../../util/validators';
|
||||
import { Button } from '../../components';
|
||||
import FieldStarRating from './FieldStarRating';
|
||||
import FieldReviewRating from './FieldReviewRating';
|
||||
|
||||
const formName = 'Styleguide.FieldStarRating.Form';
|
||||
const formName = 'Styleguide.FieldReviewRating.Form';
|
||||
|
||||
const FormComponent = props => {
|
||||
const { form, handleSubmit, invalid, pristine, submitting } = props;
|
||||
|
|
@ -14,7 +14,7 @@ const FormComponent = props => {
|
|||
|
||||
return (
|
||||
<form onSubmit={handleSubmit}>
|
||||
<FieldStarRating
|
||||
<FieldReviewRating
|
||||
id={`${form}.rate1`}
|
||||
name="rating"
|
||||
label="Rate your experience"
|
||||
|
|
@ -5,9 +5,9 @@ import { Field } from 'redux-form';
|
|||
import classNames from 'classnames';
|
||||
import { IconReviewStar, ValidationError } from '../../components';
|
||||
|
||||
import css from './FieldStarRating.css';
|
||||
import css from './FieldReviewRating.css';
|
||||
|
||||
class FieldStarRatingComponent extends Component {
|
||||
class FieldReviewRatingComponent extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.handleChange = this.handleChange.bind(this);
|
||||
|
|
@ -76,7 +76,7 @@ class FieldStarRatingComponent extends Component {
|
|||
key={`label.${inputId}`}
|
||||
className={css.label}
|
||||
htmlFor={inputId}
|
||||
title={intl.formatMessage({ id: `FieldStarRating.${starId}` })}
|
||||
title={intl.formatMessage({ id: `FieldReviewRating.${starId}` })}
|
||||
>
|
||||
<IconReviewStar rootClassName={css.star} />
|
||||
</label>
|
||||
|
|
@ -102,7 +102,7 @@ class FieldStarRatingComponent extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
FieldStarRatingComponent.defaultProps = {
|
||||
FieldReviewRatingComponent.defaultProps = {
|
||||
rootClassName: null,
|
||||
className: null,
|
||||
clearOnUnmount: false,
|
||||
|
|
@ -112,7 +112,7 @@ FieldStarRatingComponent.defaultProps = {
|
|||
|
||||
const { string, bool, shape, func, object } = PropTypes;
|
||||
|
||||
FieldStarRatingComponent.propTypes = {
|
||||
FieldReviewRatingComponent.propTypes = {
|
||||
rootClassName: string,
|
||||
className: string,
|
||||
clearOnUnmount: bool,
|
||||
|
|
@ -133,8 +133,8 @@ FieldStarRatingComponent.propTypes = {
|
|||
intl: intlShape.isRequired,
|
||||
};
|
||||
|
||||
const FieldStarRating = props => {
|
||||
return <Field component={FieldStarRatingComponent} {...props} />;
|
||||
const FieldReviewRating = props => {
|
||||
return <Field component={FieldReviewRatingComponent} {...props} />;
|
||||
};
|
||||
|
||||
export default injectIntl(FieldStarRating);
|
||||
export default injectIntl(FieldReviewRating);
|
||||
|
|
@ -27,7 +27,7 @@ export { default as EditListingWizard } from './EditListingWizard/EditListingWiz
|
|||
export { default as ExpandingTextarea } from './ExpandingTextarea/ExpandingTextarea';
|
||||
export { default as ExternalLink } from './ExternalLink/ExternalLink';
|
||||
export { default as FilterPanel } from './FilterPanel/FilterPanel';
|
||||
export { default as FieldStarRating } from './FieldStarRating/FieldStarRating';
|
||||
export { default as FieldReviewRating } from './FieldReviewRating/FieldReviewRating';
|
||||
export { default as Footer } from './Footer/Footer';
|
||||
export { default as Form } from './Form/Form';
|
||||
export { default as IconBannedUser } from './IconBannedUser/IconBannedUser';
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import classNames from 'classnames';
|
|||
import { isTransactionsTransitionAlreadyReviewed } from '../../util/errors';
|
||||
import * as propTypes from '../../util/propTypes';
|
||||
import { required } from '../../util/validators';
|
||||
import { FieldStarRating, Form, PrimaryButton, TextInputField } from '../../components';
|
||||
import { FieldReviewRating, Form, PrimaryButton, TextInputField } from '../../components';
|
||||
|
||||
import css from './ReviewForm.css';
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ const ReviewFormComponent = props => {
|
|||
|
||||
return (
|
||||
<Form className={classes} onSubmit={handleSubmit}>
|
||||
<FieldStarRating
|
||||
<FieldReviewRating
|
||||
className={css.reviewRating}
|
||||
id={`${form}.starRating`}
|
||||
name="reviewRating"
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import * as DateInputField from './components/DateInputField/DateInputField.exam
|
|||
import * as DateRangeInputField from './components/DateRangeInputField/DateRangeInputField.example';
|
||||
import * as EditListingWizard from './components/EditListingWizard/EditListingWizard.example';
|
||||
import * as ExpandingTextarea from './components/ExpandingTextarea/ExpandingTextarea.example';
|
||||
import * as FieldStarRating from './components/FieldStarRating/FieldStarRating.example';
|
||||
import * as FieldReviewRating from './components/FieldReviewRating/FieldReviewRating.example';
|
||||
import * as Footer from './components/Footer/Footer.example';
|
||||
import * as IconBannedUser from './components/IconBannedUser/IconBannedUser.example';
|
||||
import * as IconCheckmark from './components/IconCheckmark/IconCheckmark.example';
|
||||
|
|
@ -84,7 +84,7 @@ export {
|
|||
EditListingWizard,
|
||||
EmailVerificationForm,
|
||||
ExpandingTextarea,
|
||||
FieldStarRating,
|
||||
FieldReviewRating,
|
||||
Footer,
|
||||
IconBannedUser,
|
||||
IconCheckmark,
|
||||
|
|
|
|||
|
|
@ -169,11 +169,11 @@
|
|||
"EmailVerificationForm.verifying": "Verifying…",
|
||||
"EmailVerificationPage.loadingUserInformation": "Loading user information…",
|
||||
"EmailVerificationPage.title": "Verify your email address",
|
||||
"FieldStarRating.star1": "Bad experience - 1 star",
|
||||
"FieldStarRating.star2": "Not so nice - 2 stars",
|
||||
"FieldStarRating.star3": "OK - 3 stars",
|
||||
"FieldStarRating.star4": "Good - 4 stars",
|
||||
"FieldStarRating.star5": "Awesome - 5 stars",
|
||||
"FieldReviewRating.star1": "Bad experience - 1 star",
|
||||
"FieldReviewRating.star2": "Not so nice - 2 stars",
|
||||
"FieldReviewRating.star3": "OK - 3 stars",
|
||||
"FieldReviewRating.star4": "Good - 4 stars",
|
||||
"FieldReviewRating.star5": "Awesome - 5 stars",
|
||||
"Footer.copyright": "© Sharetribe 2017",
|
||||
"Footer.goToFacebook": "Go to Facebook page",
|
||||
"Footer.goToInstagram": "Go to Instagram page",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue