Skip to content

Latest commit

 

History

History
47 lines (37 loc) · 1.39 KB

README.md

File metadata and controls

47 lines (37 loc) · 1.39 KB

mui-rff

Maintainability

Test Coverage

wrapper for material ui react input components with react-final-form

React : A JavaScript library for building user interfaces

Material-UI : React components for faster and easier web development.

react-final-form : A JavaScript library for building user interfaces

Documtation could use some work docs

Usage:

  • npm i rff-wrapper
import React from 'react';
import {
  Form,
  MuiInput,
  MuiCheckbox,
  MuiSubmit,
} from 'rff-wrapper';

const FormRender = () => {
  const onSubmit = async (values) => {
    console.log('onSubmit values', values);
  };

  return (
      <Form
        onSubmit={onSubmit}
        render={(p) => {
          return (
            <form onSubmit={p.handleSubmit}>
              <MuiInput name="name" label="name" />
              <MuiCheckbox name="isCool" label="is cool" />
              <MuiSubmit />
            </form>
          );
        }}
      />
  );
};