@comparaonline/ui-forms-review
TypeScript icon, indicating that this package has built-in type declarations

3.51.0 • Public • Published

@comparaonline/ui-forms-review

Review form component

Installation

yarn add @comparaonline/ui-forms-review

Usage

Wrap component into a IntlProvider and InjectIntlContext.

import { IntlProvider, addLocaleData } from 'react-intl';
import { InjectIntlContext } from '@comparaonline/react-intl-hooks';

return (
  <IntlProvider locale="en" messages={messages}>
    <InjectIntlContext>
      <ReviewForm {...formProps} />
    </InjectIntlContext>
  </IntlProvider>
);

Component Props

prop required type description
fieldTexts true object form field names and labels
actionProps true object form button texts and click callback
handleSubmit true method form submit callback
values false object initial values
formProps false method FormProps field of react-final-form
fieldTexts required type description
rating true field Rating field name and label
username true field Username field name and label
email true field Email field name and label
comment true field Comment field name and label
actionProps required type description
submitText true string Submit button text
secondaryText true string Secondary button text
onSecondaryClick true method Secondary button click callback

Readme

Keywords

none

Package Sidebar

Install

npm i @comparaonline/ui-forms-review

Weekly Downloads

22

Version

3.51.0

License

none

Unpacked Size

39.7 kB

Total Files

27

Last publish

Collaborators

  • gnavarro
  • dsuarez_compa
  • pfariaz
  • ricardo.sosa
  • suarezcumare
  • fverag
  • comparaonline-dev
  • comparaonlineprivate
  • matotias
  • javierlara1989
  • smurua
  • eseceve
  • pablocompara