0.3.0 • Published 3 years ago

@ggf/ggf v0.3.0

Weekly downloads
17
License
ISC
Repository
github
Last release
3 years ago

GottaGoFast

GottaGoFast is a library that accelerates the development of your applications.

Getting Started

Install the package

npm install --save @ggf/ggf

Create a form

import { useForm } from "@ggf/ggf";

function Form() {
  const {
    Fields: { Email, FirstName, LastName, Age },
    handleSubmit,
  } = useForm();

  const onSubmit = ({ firstName, lastName }) => {
    alert(`Hello ${firstName} ${lastName}!`);
  };

  return (
    <Container maxWidth="md">
      <Typography variant="h2" gutterBottom>
        Update your profile
      </Typography>

      <form noValidate onSubmit={handleSubmit(onSubmit)}>
        <Email label="Email" required />
        <FirstName label="First Name" />
        <LastName label="Last Name" />
        <Age label="Age" min="10" />

        <Button type="submit" variant="contained" sx={{ mt: 2 }}>
          Submit
        </Button>
      </form>
    </Container>
  );
}

Rules

// All types
<Johyn
	label="Johyn"
	required
	matches="[0-9]"
/>
// Numeric
<Age
	label="Age"
	numeric
	min="10"
	max="10"
/>
// String
<FirstName
	label="First Name"
	string
	minLength="10"
	maxLength="10"
/>
0.3.0

3 years ago

0.2.1

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.2.0

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago