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

docs(faraday-ui):

parent 8bc5bd34
No related branches found
No related tags found
3 merge requests!222Sprint #26,!217Sprint #26,!191Hin 1116 documentation
/* eslint-disable handle-callback-err */
import React, { Fragment } from 'react'
import { get } from 'lodash'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import { reduxForm } from 'redux-form'
import React, { Fragment } from 'react'
import { th } from '@pubsweet/ui-toolkit'
import { withCountries } from 'pubsweet-component-faraday-ui'
import { required as requiredValidator } from 'xpub-validators'
import { compose, withStateHandlers, withProps } from 'recompose'
import { H3, Spinner, ValidatedField, TextField, Menu } from '@pubsweet/ui'
import { withCountries } from 'pubsweet-component-faraday-ui'
import {
Row,
......@@ -236,6 +237,72 @@ const UserProfile = ({
/>
)
UserProfile.propTypes = {
/** Passes journals label and value which will appear in the signature. */
journal: PropTypes.shape({
title: PropTypes.arrayOf(
PropTypes.shape({
label: PropTypes.string,
value: PropTypes.string,
}),
),
}),
/** Passes properties for the users profile */
user: PropTypes.shape({
/** Users unique id. */
id: PropTypes.string,
/** Type of created account. */
type: PropTypes.string,
/** Determine if account is admin ot not. */
admin: PropTypes.bool,
/** Email used for user authentification. */
email: PropTypes.string,
/** */
teams: PropTypes.array,
/** Title of account userd. */
title: PropTypes.string,
/** */
agreeTC: PropTypes.bool,
/** Country of account user. */
contry: PropTypes.string,
/** Status of account. */
isActive: PropTypes.bool,
/** Last Name of accounts user. */
lastName: PropTypes.string,
/** First name of accounts user. */
username: PropTypes.string,
/** Account user first name. */
firstName: PropTypes.string,
/** */
fragments: PropTypes.array,
/** Accounts user affiliation. */
affiliation: PropTypes.string,
/** */
collection: PropTypes.array,
/** Determine if account is confirmed or not. */
isConfirmed: PropTypes.bool,
/** Determine if account is editor in chief or not. */
editorInChief: PropTypes.bool,
/** */
notifications: PropTypes.shape({
email: PropTypes.shape({
user: PropTypes.bool,
system: PropTypes.bool,
}),
}),
/** Determine if account is hendling editor or not. */
handlingEditor: PropTypes.bool,
/** Users unique token */
token: PropTypes.array,
}),
}
UserProfile.defaultProps = {
journal: {},
user: {},
}
export default compose(
withCountries,
withStateHandlers(
......
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