From ab33e96ab08b2cca1f5c25fb9c9d2b756dc808fe Mon Sep 17 00:00:00 2001 From: Barry Gitarts Date: Mon, 5 Aug 2019 14:51:17 -0400 Subject: [PATCH] add input field to fund --- src/components/base/TextField.jsx | 5 +++-- src/components/projects/FundProject.jsx | 22 +++++++++++++++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/components/base/TextField.jsx b/src/components/base/TextField.jsx index c3aad8e..0dffe2b 100644 --- a/src/components/base/TextField.jsx +++ b/src/components/base/TextField.jsx @@ -87,6 +87,7 @@ function Input({ isRequired, endAdornment, InputProps, + inputClass, label, bottomRightLabel, bottomLeftLabel, @@ -105,7 +106,7 @@ function Input({ const bottomRight = bottomRightLabel ? renderLabel(classnames(classes.formLabel, classes.bottomRight), idFor, bottomRightLabel) : null return ( { labelForm } { topRightLabel } @@ -118,7 +119,7 @@ function Input({ onChange={onChange} classes={{ root: multiline ? classes.multi : classes.root, - input: classes.input, + input: classnames(classes.input, inputClass), }} onBlur={onBlur} value={value} diff --git a/src/components/projects/FundProject.jsx b/src/components/projects/FundProject.jsx index c8f2ffb..39956a8 100644 --- a/src/components/projects/FundProject.jsx +++ b/src/components/projects/FundProject.jsx @@ -20,6 +20,7 @@ import { useProjectData } from './hooks' import { getNumberOfBackers, getMediaType, getMediaSrc } from '../../utils/project' import { getDateCreated, convertToHours } from '../../utils/dates' import MediaView from '../base/MediaView' +import StatusTextField from '../base/TextField' const { addProject } = LiquidPledging.methods @@ -33,6 +34,12 @@ const styles = theme => ({ cursor: 'pointer', color: '#4360DF' }, + amount: { + marginTop: '3rem' + }, + amountInput: { + textAlign: 'right' + }, root: { display: 'grid', gridTemplateColumns: 'repeat(12, [col] 1fr)', @@ -223,7 +230,7 @@ const SubmissionSection = ({ classes, history, projectData, projectId, pledges, return ( { const { firstHalf, secondHalf, fullWidth } = classes + const usdValue = manifest ? convertTokenAmountUsd(manifest.goalToken, values.amount, prices) : 0 //start project view return ( @@ -331,6 +339,18 @@ const SubmissionSection = ({ classes, history, projectData, projectId, pledges, {`${totalPledged ? convertTokenAmountUsd(manifest.goalToken, totalPledged, prices) : '$0'} of ${convertTokenAmountUsd(manifest.goalToken, manifest.goal, prices)} USD`} +