add photo icon

This commit is contained in:
Barry Gitarts 2019-07-22 14:25:46 -04:00 committed by Barry G
parent c89f26e6fb
commit 55a2fe40a6
4 changed files with 47 additions and 1 deletions

View File

@ -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 }) => {

View File

@ -0,0 +1,10 @@
import React from 'react'
const SVG = () =>
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fillRule="evenodd" clipRule="evenodd" d="M15 6.5C13.0669 6.5 11.5 8.06702 11.5 10C11.5 11.933 13.0669 13.5 15 13.5C16.9331 13.5 18.5 11.933 18.5 10C18.5 8.06702 16.9331 6.5 15 6.5ZM13.5 10C13.5 9.17163 14.1716 8.5 15 8.5C15.8284 8.5 16.5 9.17163 16.5 10C16.5 10.8284 15.8284 11.5 15 11.5C14.1716 11.5 13.5 10.8284 13.5 10Z" fill="#939BA1"/>
<path fillRule="evenodd" clipRule="evenodd" d="M2 6C2 4.34314 3.34326 3 5 3H19C20.6567 3 22 4.34314 22 6V18C22 19.6569 20.6567 21 19 21H5C3.34326 21 2 19.6569 2 18V6ZM5 5C4.44775 5 4 5.44775 4 6V12.2327C4 12.5094 4.32008 12.6633 4.53615 12.4904L5.89258 11.4053C7.13916 10.408 8.94849 10.5616 10.009 11.7548L16.3 18.8322C16.3949 18.9389 16.5309 19 16.6738 19H19C19.5522 19 20 18.5522 20 18V6C20 5.44775 19.5522 5 19 5H5ZM4 18V15.9612C4 15.6574 4.1381 15.3701 4.37532 15.1803L7.14209 12.967C7.55762 12.6345 8.16064 12.6858 8.51416 13.0835L13.285 18.4508C13.4742 18.6636 13.3231 19 13.0383 19H5C4.44775 19 4 18.5522 4 18Z" fill="#939BA1"/>
</svg>
export default SVG

View File

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 6.5C13.0669 6.5 11.5 8.06702 11.5 10C11.5 11.933 13.0669 13.5 15 13.5C16.9331 13.5 18.5 11.933 18.5 10C18.5 8.06702 16.9331 6.5 15 6.5ZM13.5 10C13.5 9.17163 14.1716 8.5 15 8.5C15.8284 8.5 16.5 9.17163 16.5 10C16.5 10.8284 15.8284 11.5 15 11.5C14.1716 11.5 13.5 10.8284 13.5 10Z" fill="#939BA1"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 6C2 4.34314 3.34326 3 5 3H19C20.6567 3 22 4.34314 22 6V18C22 19.6569 20.6567 21 19 21H5C3.34326 21 2 19.6569 2 18V6ZM5 5C4.44775 5 4 5.44775 4 6V12.2327C4 12.5094 4.32008 12.6633 4.53615 12.4904L5.89258 11.4053C7.13916 10.408 8.94849 10.5616 10.009 11.7548L16.3 18.8322C16.3949 18.9389 16.5309 19 16.6738 19H19C19.5522 19 20 18.5522 20 18V6C20 5.44775 19.5522 5 19 5H5ZM4 18V15.9612C4 15.6574 4.1381 15.3701 4.37532 15.1803L7.14209 12.967C7.55762 12.6345 8.16064 12.6858 8.51416 13.0835L13.285 18.4508C13.4742 18.6636 13.3231 19 13.0383 19H5C4.44775 19 4 18.5522 4 18Z" fill="#939BA1"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -299,6 +299,35 @@ const SubmissionSection = ({ classes, history }) => {
onBlur={handleBlur}
value={values.avatar || ''}
/>
<IconTextField
iconName="photo"
InputProps={{
startAdornment: (
<InputAdornment position="start">
<CloudUpload
style={{ cursor: 'pointer' }}
onClick={() => {
const activeField = 'video'
setStatus({ ...status, activeField })
uploadInput.click()
}
}
/>
</InputAdornment>
),
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 || ''}
/>
<TextField
className={classes.textField}