From 55a2fe40a68174f09eb9841f29b3b83bc487b7bc Mon Sep 17 00:00:00 2001 From: Barry Gitarts Date: Mon, 22 Jul 2019 14:25:46 -0400 Subject: [PATCH] add photo icon --- src/components/base/icons/IconByName.jsx | 5 +++- src/components/base/icons/Photo.jsx | 10 ++++++++ src/components/base/icons/photo.svg | 4 ++++ src/components/projects/CreateProject.jsx | 29 +++++++++++++++++++++++ 4 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 src/components/base/icons/Photo.jsx create mode 100755 src/components/base/icons/photo.svg diff --git a/src/components/base/icons/IconByName.jsx b/src/components/base/icons/IconByName.jsx index fe44ed7..afd0be2 100644 --- a/src/components/base/icons/IconByName.jsx +++ b/src/components/base/icons/IconByName.jsx @@ -1,12 +1,15 @@ import React from 'react' import OneOnOneChat from './OneOnOneChat' import BoxArrow from './BoxArrow' +import Photo from './Photo' const ONE_ON_ONE_CHAT = 'oneOnOneChat' const BOX_ARROW = 'boxArrow' +const PHOTO = 'photo' const icons = { [ONE_ON_ONE_CHAT]: OneOnOneChat, - [BOX_ARROW]: BoxArrow + [BOX_ARROW]: BoxArrow, + [PHOTO]: Photo } const Icon = ({ name }) => { diff --git a/src/components/base/icons/Photo.jsx b/src/components/base/icons/Photo.jsx new file mode 100644 index 0000000..93e2c4d --- /dev/null +++ b/src/components/base/icons/Photo.jsx @@ -0,0 +1,10 @@ +import React from 'react' + +const SVG = () => + + + + + + +export default SVG diff --git a/src/components/base/icons/photo.svg b/src/components/base/icons/photo.svg new file mode 100755 index 0000000..a1abc0a --- /dev/null +++ b/src/components/base/icons/photo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/projects/CreateProject.jsx b/src/components/projects/CreateProject.jsx index f9817f2..f9a6c61 100644 --- a/src/components/projects/CreateProject.jsx +++ b/src/components/projects/CreateProject.jsx @@ -299,6 +299,35 @@ const SubmissionSection = ({ classes, history }) => { onBlur={handleBlur} value={values.avatar || ''} /> + + { + const activeField = 'video' + setStatus({ ...status, activeField }) + uploadInput.click() + } + } + /> + + ), + classes: { + input: classes.textInput + } + }} + className={fullWidth} + isRequired={true} + idFor="video" + name="video" + placeholder="Upload video or enter url" + onChange={handleChange} + onBlur={handleBlur} + value={values.title || ''} + />