0.2.10 • Published 4 years ago

ninti v0.2.10

Weekly downloads
52
License
-
Repository
-
Last release
4 years ago

Installation

Just add ninti to your project:

yarn add ninti

Basics

Ninti exposes two default form elements: <Form /> and <Input />.

import React from "react";
import { Form, Input } from "ninti";

function App() {
  function handleSubmit(data) {
    console.log(data);

    /**
     * {
     *   email: 'email@example.com',
     *   password: '123456'
     * }
     */
  }

  return (
    <Form onSubmit={handleSubmit}>
      <Input name="email" />
      <Input name="password" type="password" />

      <button type="submit">Sign in</button>
    </Form>
  );
}