@codecraftkit/formfield

Made with create-react-library

Usage no npm install needed!

<script type="module">
  import codecraftkitFormfield from 'https://cdn.skypack.dev/@codecraftkit/formfield';
</script>

README

formfield

Made with create-react-library

NPM JavaScript Style Guide

Install

npm install --save @codecraftkit/formfield

Usage

import React, { Component } from 'react'
import FormField from "@codecraftkit/formfield";
import {Form, Formik} from "formik"

const ExampleComponent = () => {
  return (
    <Formik
        initialValues={{subject:""}}
        onSubmit={onSubmit}>
        {() => (
            <Form>
                <Grid gap={4}>
                    <FormField
                        type='text'
                        required
                        name='subject'
                        label='Password'/>
                    <Button
                        type='submit'
                        size='xs'
                        variantColor='green'
                        justifySelf='flex-end'>
                        Submit
                    </Button>
                </Grid>
            </Form>
        )}
    </Formik>
    ))
}

License

MIT © CodeCraft