This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as React from 'react'; | |
| import { Field } from 'redux-form'; | |
| export const Radio = props => { | |
| if (props && props.input && props.options) { | |
| const renderRadioButtons = (key, index) => { | |
| return ( | |
| <label className="sans-serif w-100" key={`${index}`} htmlFor={`${props.input.name}-${index}`}> | |
| <Field | |
| id={`${props.input.name}`} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { Field } from 'redux-form'; | |
| import Text from '../components/text'; | |
| import Select from '../components/select'; | |
| export const FormComponent = ({ handleSubmit, onSubmit }) => { | |
| return ( | |
| <div className="flex flex-column justify-center items-center"> | |
| <h1>My Very own Form</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| export const Select = props => { | |
| const renderSelectOptions = (key, index) => { | |
| return ( | |
| <option | |
| key={`${index}-${key}`} | |
| value={key} | |
| > | |
| {props.options[key]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { Field } from 'redux-form'; | |
| import Text from '../components/text'; | |
| export const FormComponent = ({ handleSubmit, onSubmit }) => { | |
| return ( | |
| <div className="flex flex-column justify-center items-center"> | |
| <h1>My Very own Form</h1> | |
| <form | |
| className="w-80" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { Field } from 'redux-form'; | |
| import Text from '../components/text'; | |
| export const FormComponent = ({ handleSubmit, onSubmit }) => { | |
| return ( | |
| <div className="flex flex-column justify-center items-center"> | |
| <h1>My Very own Form</h1> | |
| <form | |
| className="w-80" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| export const Text = ({ label, input }) => { | |
| return ( | |
| <div className="mv4 w-100"> | |
| <div className="b sans-serif pv2 w-100"> | |
| {label} | |
| </div> | |
| <input | |
| {...input} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| import { Provider } from 'react-redux'; | |
| import "tachyons" | |
| import FormContainer from './modules/form/form.container'; | |
| import configureStore from './store'; | |
| const store = configureStore(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { Field } from 'redux-form'; | |
| import Text from '../components/text'; | |
| export const FormComponent = ({ handleSubmit, onSubmit }) => { | |
| return ( | |
| <div> | |
| <h1>My Very own Form</h1> | |
| <form onSubmit={handleSubmit(onSubmit)}> | |
| <Field |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| export const Text = ({ label, input }) => { | |
| console.log('inputStuff: ', input); | |
| return ( | |
| <div> | |
| <div> | |
| {label} | |
| </div> | |
| <div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { Field } from 'redux-form'; | |
| export const FormComponent = ({ handleSubmit, onSubmit }) => { | |
| return ( | |
| <div> | |
| <h1>My Very own Form</h1> | |
| <form onSubmit={handleSubmit(onSubmit)}> | |
| <Field | |
| name="firstName" |