diff --git a/src/components/CurrencyInputField/CurrencyInputField.css b/src/components/FieldCurrencyInput/FieldCurrencyInput.css similarity index 100% rename from src/components/CurrencyInputField/CurrencyInputField.css rename to src/components/FieldCurrencyInput/FieldCurrencyInput.css diff --git a/src/components/CurrencyInputField/CurrencyInputField.example.js b/src/components/FieldCurrencyInput/FieldCurrencyInput.example.js similarity index 94% rename from src/components/CurrencyInputField/CurrencyInputField.example.js rename to src/components/FieldCurrencyInput/FieldCurrencyInput.example.js index 252d6184..78a18649 100644 --- a/src/components/CurrencyInputField/CurrencyInputField.example.js +++ b/src/components/FieldCurrencyInput/FieldCurrencyInput.example.js @@ -7,7 +7,7 @@ import en from 'react-intl/locale-data/en'; import fi from 'react-intl/locale-data/fi'; import { currencyConfig } from '../../util/test-data'; import * as validators from '../../util/validators'; -import CurrencyInputField, { CurrencyInput } from './CurrencyInputField'; +import FieldCurrencyInput, { CurrencyInput } from './FieldCurrencyInput'; const currencyConfigUSD = { ...currencyConfig, @@ -81,14 +81,14 @@ export const defaultValueWithFiEUR = { group: 'custom inputs', }; -const formName = 'Styleguide.CurrencyInputField.Form'; +const formName = 'Styleguide.FieldCurrencyInput.Form'; const FormComponent = props => { const { form } = props; const required = validators.required('This field is required'); return (
- { +const FieldCurrencyInputComponent = props => { const { rootClassName, className, id, label, input, meta, ...rest } = props; if (label && !id) { @@ -263,14 +263,14 @@ const CurrencyInputFieldComponent = props => { ); }; -CurrencyInputFieldComponent.defaultProps = { +FieldCurrencyInputComponent.defaultProps = { rootClassName: null, className: null, id: null, label: null, }; -CurrencyInputFieldComponent.propTypes = { +FieldCurrencyInputComponent.propTypes = { rootClassName: string, className: string, @@ -284,8 +284,8 @@ CurrencyInputFieldComponent.propTypes = { meta: object.isRequired, }; -const CurrencyInputField = props => { - return ; +const FieldCurrencyInput = props => { + return ; }; -export default CurrencyInputField; +export default FieldCurrencyInput; diff --git a/src/components/index.js b/src/components/index.js index f45c3f32..5044b818 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -9,7 +9,6 @@ export { InlineTextButton, } from './Button/Button'; export { default as CookieConsent } from './CookieConsent/CookieConsent'; -export { default as CurrencyInputField } from './CurrencyInputField/CurrencyInputField'; export { default as Discussion } from './Discussion/Discussion'; export { default as EditListingDescriptionPanel, @@ -30,6 +29,7 @@ export { default as ExternalLink } from './ExternalLink/ExternalLink'; export { default as FilterPanel } from './FilterPanel/FilterPanel'; export { default as FieldBirthdayInput } from './FieldBirthdayInput/FieldBirthdayInput'; export { default as FieldCheckbox } from './FieldCheckbox/FieldCheckbox'; +export { default as FieldCurrencyInput } from './FieldCurrencyInput/FieldCurrencyInput'; export { default as FieldDateRangeInput } from './FieldDateRangeInput/FieldDateRangeInput'; export { default as FieldGroupCheckbox } from './FieldGroupCheckbox/FieldGroupCheckbox'; export { default as FieldReviewRating } from './FieldReviewRating/FieldReviewRating'; diff --git a/src/containers/EditListingPricingForm/EditListingPricingForm.js b/src/containers/EditListingPricingForm/EditListingPricingForm.js index 9ee6a13f..959389cd 100644 --- a/src/containers/EditListingPricingForm/EditListingPricingForm.js +++ b/src/containers/EditListingPricingForm/EditListingPricingForm.js @@ -7,7 +7,7 @@ import classNames from 'classnames'; import config from '../../config'; import { propTypes } from '../../util/types'; import { required } from '../../util/validators'; -import { Form, Button, CurrencyInputField } from '../../components'; +import { Form, Button, FieldCurrencyInput } from '../../components'; import css from './EditListingPricingForm.css'; @@ -45,8 +45,8 @@ export const EditListingPricingFormComponent = props => { return ( {errorMessage} -