From 340c223a510a5452e51cad8e31871e95883507db Mon Sep 17 00:00:00 2001 From: Barry Gitarts Date: Mon, 22 Jul 2019 15:47:00 -0400 Subject: [PATCH] add avatar icon add avatar input replace old style --- src/components/base/icons/AddPerson.jsx | 9 +++++ src/components/base/icons/AddPerson.svg | 3 ++ src/components/base/icons/IconByName.jsx | 3 ++ src/components/projects/CreateProject.jsx | 44 ++++++++++------------- 4 files changed, 33 insertions(+), 26 deletions(-) create mode 100644 src/components/base/icons/AddPerson.jsx create mode 100644 src/components/base/icons/AddPerson.svg diff --git a/src/components/base/icons/AddPerson.jsx b/src/components/base/icons/AddPerson.jsx new file mode 100644 index 0000000..b5d60f6 --- /dev/null +++ b/src/components/base/icons/AddPerson.jsx @@ -0,0 +1,9 @@ +import React from 'react' + +const SVG = () => + + + + + +export default SVG diff --git a/src/components/base/icons/AddPerson.svg b/src/components/base/icons/AddPerson.svg new file mode 100644 index 0000000..2ec956c --- /dev/null +++ b/src/components/base/icons/AddPerson.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/base/icons/IconByName.jsx b/src/components/base/icons/IconByName.jsx index afd0be2..e7cedfd 100644 --- a/src/components/base/icons/IconByName.jsx +++ b/src/components/base/icons/IconByName.jsx @@ -2,11 +2,14 @@ import React from 'react' import OneOnOneChat from './OneOnOneChat' import BoxArrow from './BoxArrow' import Photo from './Photo' +import AddPerson from './AddPerson' +const ADD_PERSON = 'addPerson' const ONE_ON_ONE_CHAT = 'oneOnOneChat' const BOX_ARROW = 'boxArrow' const PHOTO = 'photo' const icons = { + [ADD_PERSON]: AddPerson, [ONE_ON_ONE_CHAT]: OneOnOneChat, [BOX_ARROW]: BoxArrow, [PHOTO]: Photo diff --git a/src/components/projects/CreateProject.jsx b/src/components/projects/CreateProject.jsx index 3c9a78b..0d6c596 100644 --- a/src/components/projects/CreateProject.jsx +++ b/src/components/projects/CreateProject.jsx @@ -3,12 +3,10 @@ import { Formik } from 'formik' import classnames from 'classnames' import ReactMarkdown from 'react-markdown' import LiquidPledging from '../../embarkArtifacts/contracts/LiquidPledging' -import TextField from '@material-ui/core/TextField' import FormControlLabel from '@material-ui/core/FormControlLabel' import Switch from '@material-ui/core/Switch' import Button from '@material-ui/core/Button' import InputAdornment from '@material-ui/core/InputAdornment' -import CloudUpload from '@material-ui/icons/CloudUpload' import { withStyles } from '@material-ui/core/styles' import { uploadFilesToIpfs, formatMedia, isWeb } from '../../utils/ipfs' import { FundingContext } from '../../context' @@ -273,32 +271,26 @@ const SubmissionSection = ({ classes, history }) => { onBlur={handleBlur} value={values.repo || ''} /> - - { - const activeField = 'avatar' - setStatus({ ...status, activeField }) - uploadInput.click() - } - } - /> - - ), - classes: { - input: classes.textInput - } - }} - id="avatar" + + { + const activeField = 'avatar' + setStatus({ ...status, activeField }) + uploadInput.click() + } + } + >Browse + + + )} + className={fullWidth} + idFor="avatar" name="avatar" - label="Upload or enter link to creator avatar" placeholder="upload or enter link to creator avatar" - margin="normal" - variant="outlined" onChange={handleChange} onBlur={handleBlur} value={values.avatar || ''}