Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
ui-component-library / stories / forms / FormDebug.ts
Size: Mime:
// see signinmodal - wip for poc there
import React from 'react'
import { extendObservable, action, observable, computed } from 'xmobx/mobx'
import { observer } from 'xmobx/mobx-react'
import { Form as BaseForm } from '../../src/forms'

const formState = observable({
  inputsList: [
    // @TODO can pass into inputs
    {
      name: 0,
      type: 'checkbox',
      value: '',
    },
    {
      name: 1,
      type: 'radio',
      value: '',
    },
    {
      name: 2,
      type: 'email',
      value: 'james@eh',
    },
    {
      name: 3,
      type: 'password',
      value: '123',
    },
    {
      // slider
      name: 4,
      type: 'range',
    },
    {
      name: 5,
      type: 'number',
      value: 10,
    },
    {
      name: 6,
      type: 'tel',
      value: '1250-555-5555',
    },
    {
      name: 7,
      type: 'color',
      value: 'blue',
    },
    {
      name: 10,
      type: 'text',
      value: 'default',
    },
    {
      name: 11,
      type: 'submit',
      value: 'submit',
    },
  ],
})

const wording = {
  submit: 'CONTINUE',
}

const Form = BaseForm.from(formState)

export default Form