add no image placeholder
This commit is contained in:
parent
69e3430215
commit
891d8163d2
|
@ -0,0 +1,34 @@
|
|||
import React from 'react'
|
||||
import { withStyles } from '@material-ui/core/styles'
|
||||
import PhotoIcon from './icons/Photo.jsx'
|
||||
|
||||
const styles = theme => ({
|
||||
theme,
|
||||
main: {
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
background: 'rgba(147, 155, 161, 0.1)',
|
||||
minHeight: '15em',
|
||||
gridColumn: '1 / 13'
|
||||
},
|
||||
icon: {},
|
||||
subText: {
|
||||
color: '#939BA1',
|
||||
fontSize: '0.9375rem'
|
||||
}
|
||||
})
|
||||
|
||||
function NoImage({ classes }){
|
||||
return (
|
||||
<div className={classes.main}>
|
||||
<div className={classes.icon}>
|
||||
<PhotoIcon />
|
||||
</div>
|
||||
<div className={classes.subText}>No image available</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default withStyles(styles)(NoImage)
|
|
@ -15,6 +15,7 @@ import IconTextField from '../base/IconTextField'
|
|||
import Icon from '../base/icons/IconByName'
|
||||
import { convertTokenAmountUsd } from '../../utils/prices'
|
||||
import { setMediaType } from '../../utils/project'
|
||||
import NoImage from '../base/NoImage'
|
||||
|
||||
const { addProject } = LiquidPledging.methods
|
||||
|
||||
|
@ -335,6 +336,7 @@ const SubmissionSection = ({ classes, history }) => {
|
|||
onBlur={handleBlur}
|
||||
value={values.media || ''}
|
||||
/>
|
||||
<NoImage />
|
||||
{status && status.showPreview &&
|
||||
<div className={classnames(classes.markdown, fullWidth)}>
|
||||
<div
|
||||
|
|
Loading…
Reference in New Issue