agronomeet_register

1.0.9 • Public • Published

AGRONOMEET REGISTER

React Registration Component connected to Agronomeet API

INSTALL

npm i agronomeet_register

USAGE

import AgronomeetRegister from 'agronomeet_register';
 
<AgronomeetRegister
  url="" // API url
  submitLabel="" // submit button label
  fields={[
    // Array of fileds as objects
    {
      id: '', // field unique id - for password use 'password' - for password confirmation use 'confirmPassword'
      label: '', // field label
      placeholder: '', // field placeholder,
      tagType: '', // field tag type - input/select
      type: '', // field type -  used if input
      required: true / false, // required boolean
      errorMessage: '', // Error message on inputs or selects
      options: [
        // if tagType === select - Array of option objects
        {
          value: '', // option value
          label: '' // option label
        }
      ]
    }
  ]}
  errors={{
    // object for error messages
    server: ''
  }}
  onSubmitOk={res => {
    // return res object if OK
  }}
  onSubmitError={error => {
    // return error if KO
  }}
  jss={{
    // jss styles for each element of form
    container: {},
    inputContainer: {},
    label: {},
    input: {},
    inputError: {},
    inputErrorMessage: {},
    select: {},
    selectMenu: {},
    selectMenuItem: {},
    error: {},
    button: {}
  }}
/>;

DEV INSTALL

  • clone repository: git clone <repository_url>
  • cd path/to/app
  • run npm install
  • make changes. Use npm link to test it
  • npm run build
  • update package.json version number
  • npm publish

Readme

Keywords

none

Package Sidebar

Install

npm i agronomeet_register

Weekly Downloads

1

Version

1.0.9

License

ISC

Unpacked Size

224 kB

Total Files

6

Last publish

Collaborators

  • gianlucasolinas
  • giovannibieller
  • michele