1.0.11 • Published 4 years ago

@cc-test2/formfield v1.0.11

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

formfield

Made with create-react-library

NPM JavaScript Style Guide

Install

npm install --save @cc-test2/formfield

Usage

import React, { Component } from 'react'
import FormField from "@cc-test2/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