Skip to content

Instantly share code, notes, and snippets.

View kylebuildsstuff's full-sized avatar

Kyle kylebuildsstuff

View GitHub Profile
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}`}
@kylebuildsstuff
kylebuildsstuff / .js
Last active September 23, 2017 17:07
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>
import React from 'react';
export const Select = props => {
const renderSelectOptions = (key, index) => {
return (
<option
key={`${index}-${key}`}
value={key}
>
{props.options[key]}
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"
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"
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}
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();
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
import React from 'react';
export const Text = ({ label, input }) => {
console.log('inputStuff: ', input);
return (
<div>
<div>
{label}
</div>
<div>
@kylebuildsstuff
kylebuildsstuff / .js
Last active September 23, 2017 23:00
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"