Skip to content
Snippets Groups Projects
Commit b5b831f4 authored by Sinzeanu Demetriad's avatar Sinzeanu Demetriad
Browse files

docs(ManuscriptFiles): Wrote documentation for ManuscriptFiles component

parent d5e9ed17
No related branches found
No related tags found
3 merge requests!222Sprint #26,!217Sprint #26,!191Hin 1116 documentation
...@@ -44,7 +44,7 @@ AuthorReviews.propTypes = { ...@@ -44,7 +44,7 @@ AuthorReviews.propTypes = {
getSignedUrl: PropTypes.func, getSignedUrl: PropTypes.func,
/** Object containing the list of recommendations. */ /** Object containing the list of recommendations. */
journal: PropTypes.object, //eslint-disable-line journal: PropTypes.object, //eslint-disable-line
/** Contains the token of the currently logged user */ /** Contains the token of the currently logged user. */
token: PropTypes.string, token: PropTypes.string,
} }
......
...@@ -114,9 +114,9 @@ export default compose( ...@@ -114,9 +114,9 @@ export default compose(
)(ManuscriptDetailsTop) )(ManuscriptDetailsTop)
ManuscriptDetailsTop.propTypes = { ManuscriptDetailsTop.propTypes = {
/** Object with details about fragment. */ /** Object containing the selected fragment. */
fragment: PropTypes.object, //eslint-disable-line fragment: PropTypes.object, //eslint-disable-line
/** Object with details about collection. */ /** Object containing the selected collection. */
collection: PropTypes.object, //eslint-disable-line collection: PropTypes.object, //eslint-disable-line
/** Object with versions of manuscript. */ /** Object with versions of manuscript. */
versions: PropTypes.array, //eslint-disable-line versions: PropTypes.array, //eslint-disable-line
......
import React from 'react' import React from 'react'
import { get, has } from 'lodash' import { get, has } from 'lodash'
import { Field } from 'redux-form' import { Field } from 'redux-form'
import PropTypes from 'prop-types'
import { Icon } from '@pubsweet/ui' import { Icon } from '@pubsweet/ui'
import styled from 'styled-components' import styled from 'styled-components'
import { th } from '@pubsweet/ui-toolkit' import { th } from '@pubsweet/ui-toolkit'
...@@ -59,6 +60,42 @@ const ManuscriptFiles = ({ ...@@ -59,6 +60,42 @@ const ManuscriptFiles = ({
</ContextualBox> </ContextualBox>
) )
ManuscriptFiles.propTypes = {
/** Contains the token of the currently logged user. */
token: PropTypes.string,
/** Object containing the selected fragment. */
fragment: PropTypes.object, //eslint-disable-line
/** Object containing the selected collection. */
collection: PropTypes.object, //eslint-disable-line
/** Name of added form. */
formName: PropTypes.func,
/** Change added form. */
changeForm: PropTypes.func,
/** Removes the file from the server. */
deleteFile: PropTypes.func,
/** Uploads the file to the server. */
uploadFile: PropTypes.func,
/** View content of the uploaded file. */
previewFile: PropTypes.func,
/** An async call that returns the securized S3 file url. */
getSignedUrl: PropTypes.func,
/** Value representing if the form has any errors. */
formErrors: PropTypes.object, //eslint-disable-line
}
ManuscriptFiles.defaultProps = {
token: '',
fragment: {},
collection: {},
formName: undefined,
changeForm: undefined,
deleteFile: undefined,
uploadFile: undefined,
previewFile: undefined,
getSignedUrl: undefined,
formErrors: {},
}
export default ManuscriptFiles export default ManuscriptFiles
// #region styled-components // #region styled-components
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment