/react-ocean-forms-react-intl

i18n adapter for react-ocean-forms using react-intl

Primary LanguageTypeScriptMIT LicenseMIT

react-ocean-forms-react-intl

npm GitHub license travis Greenkeeper badge Coverage Status

react-ocean-forms-react-intl works with react-ocean-forms to enable react-intl support in the forms.

API Documentation and Showcase

Features

  • Plug and play extension for multi-language support

Install

npm install react-ocean-forms-react-intl

yarn add react-ocean-forms-react-intl

Usage

Simply swap out any existing Form references with IntlForm from this package.

import { IntlForm } from 'react-ocean-forms-react-intl';

Then replace the existing form tags.

<IntlForm onSubmit={this.handleSubmit}>
  <Input
    name="name"
    label="demo_name"
  />

  <button type="submit">Submit</button>
</IntlForm>

IntlForm passes all props to Form. You can find a detailed documentation in the react-ocean-forms repository.