From dc20621312a9f3cc2716a4f19e18fd4cbcc21a52 Mon Sep 17 00:00:00 2001 From: Barry Gitarts Date: Mon, 1 Apr 2019 15:59:38 -0400 Subject: [PATCH] add submission section form --- app/components/projects/CreateProject.jsx | 201 +++++++++++++++++++++- 1 file changed, 198 insertions(+), 3 deletions(-) diff --git a/app/components/projects/CreateProject.jsx b/app/components/projects/CreateProject.jsx index eef85e8..d778df1 100644 --- a/app/components/projects/CreateProject.jsx +++ b/app/components/projects/CreateProject.jsx @@ -1,5 +1,10 @@ import React from 'react' +import { Formik } from 'formik' +import TextField from '@material-ui/core/TextField' import Divider from '@material-ui/core/Divider' +import FormControlLabel from '@material-ui/core/FormControlLabel' +import Switch from '@material-ui/core/Switch' +import Button from '@material-ui/core/Button' import { withStyles } from '@material-ui/core/styles' const styles = theme => ({ @@ -8,7 +13,7 @@ const styles = theme => ({ gridTemplateColumns: 'repeat(12, [col] 1fr)', gridTemplateRows: 'repeat(5, [row] auto)', gridColumnGap: '1em', - gridRowGap: '36px', + gridRowGap: '3ch', fontFamily: theme.typography.fontFamily, [theme.breakpoints.up('sm')]: { margin: '1.75rem 4.5rem' @@ -24,11 +29,28 @@ const styles = theme => ({ textAlign: 'center' }, submissionRoot: { + display: 'grid', + gridTemplateColumns: 'repeat(12, [col] 1fr)', + gridTemplateRows: 'repeat(5, [row] auto)', + gridColumnGap: '1em', + gridColumnStart: '1', + gridColumnEnd: '13', + gridRowGap: '2ch', + }, + formControl: { + gridColumnStart: '6' + }, + formButton: { + gridColumnStart: '1', + gridColumnEnd: '13', + height: '50px' + }, + textField: { gridColumnStart: '1', gridColumnEnd: '13' }, - textField: { - width: '100%' + textInput: { + fontSize: '2rem' } }) @@ -39,10 +61,183 @@ const Title = ({ className }) => ( ) +const SubmissionSection = ({ classes }) => { + return ( + + {({ + values, + errors, + touched, + handleChange, + handleBlur, + handleSubmit, + setFieldValue, + setStatus, + status + }) => { + return ( +
+ + + + + + + + + } + label="Autoplay video?" + /> + + + + ) + } + } +
+ ) +} + function CreateProject({ classes }) { return (
+ <SubmissionSection classes={classes} /> </div> ) }