From 07dfceb03fa01607f33b46f673acfb2ac284d59d Mon Sep 17 00:00:00 2001 From: Barry Gitarts Date: Wed, 17 Jul 2019 14:48:50 -0400 Subject: [PATCH] add bottom right label --- src/components/base/TextField.jsx | 24 +++++++++++++++++++---- src/components/projects/CreateProject.jsx | 3 ++- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/components/base/TextField.jsx b/src/components/base/TextField.jsx index 0dd051c..d23b105 100644 --- a/src/components/base/TextField.jsx +++ b/src/components/base/TextField.jsx @@ -9,14 +9,18 @@ import FormControl from '@material-ui/core/FormControl' const styles = theme => ({ container: { - display: 'flex', - flexWrap: 'wrap', + display: 'grid', + gridTemplateColumns: 'repeat(12, [col] 1fr)', + gridTemplateRows: '24px 24px 36px' }, margin: { margin: theme.spacing.unit, }, root: { 'label + &': { + gridRowStart: 2, + gridColumnStart: 1, + gridColumnEnd: 13, marginTop: theme.spacing.unit * 3, }, }, @@ -27,9 +31,18 @@ const styles = theme => ({ padding: '20px 12px' }, formLabel: { + gridRowStart: 1, fontSize: '18px', color: '#939BA1' }, + top: { + gridRowStart: 1 + }, + bottomRight: { + fontSize: '15px', + gridRowStart: 4, + gridColumnStart: 12 + } }) const renderLabel = (formLabelClass, idFor, label, isRequired) => ( @@ -49,6 +62,7 @@ function Input({ idFor, isRequired, label, + bottomRightLabel, placeholder, className, name, @@ -56,9 +70,10 @@ function Input({ onBlur, value }) { - const labelForm = label ? renderLabel(classes.formLabel, idFor, label, isRequired) : null + const labelForm = label ? renderLabel(classnames(classes.formLabel, classes.top), idFor, label, isRequired) : null + const bottomRight = bottomRightLabel ? renderLabel(classnames(classes.formLabel, classes.bottomRight), idFor, bottomRightLabel) : null return ( - + { labelForm } + { bottomRight } ) } diff --git a/src/components/projects/CreateProject.jsx b/src/components/projects/CreateProject.jsx index 7b96acc..00fa967 100644 --- a/src/components/projects/CreateProject.jsx +++ b/src/components/projects/CreateProject.jsx @@ -207,9 +207,10 @@ const SubmissionSection = ({ classes, history }) => {