Newer
Older
import React, { Fragment } from 'react'
import { Field } from 'redux-form'

Alexandru Munteanu
committed
import styled from 'styled-components'
import { H2, Icon } from '@pubsweet/ui'
import { Row, Text, WizardFiles } from 'pubsweet-component-faraday-ui'
import { Empty } from './'
const StepThree = ({
token,
version,
project,
changeForm,
deleteFile,
uploadFile,
filesError,
getSignedUrl,
}) => (
<CustomH2>3. Manuscript Files Upload</CustomH2>
<Row mb={2}>
<Text align="center" display="flex" secondary>
Drag & drop files in the specific section or click{' '}
<Icon secondary size={2}>
plus
</Icon>{' '}
to upload. Use the{' '}
<Icon secondary size={2}>
</Icon>{' '}
icon to reorder or move files to a different type.
</Text>
</Row>
<Field component={Empty} name="files" />
<WizardFiles
changeForm={changeForm}
deleteFile={deleteFile}
files={get(version, 'files', {})}
getSignedUrl={getSignedUrl}
project={project}
token={token}
uploadFile={uploadFile}
version={version}
{filesError && (
<Row mt={1}>
<Text error>{filesError}</Text>
</Row>
)}
</Fragment>
)
export default StepThree
// #region styles

Alexandru Munteanu
committed
const CustomH2 = styled(H2)`
margin: 0;
`
// #endregion