Skip to content
Snippets Groups Projects
Commit 055ff076 authored by Alexandru Munteanu's avatar Alexandru Munteanu
Browse files

docs(faraday-ui): fix some props that anca wrote

parent 80f4620f
No related branches found
No related tags found
3 merge requests!222Sprint #26,!217Sprint #26,!191Hin 1116 documentation
......@@ -26,9 +26,9 @@ const AuthorTag = ({
AuthorTag.propTypes = {
/** The author you want to be on the card. */
author: PropTypes.shape({
id: PropTypes.number,
firstName: PropTypes.number,
lastName: PropTypes.number,
id: PropTypes.string,
firstName: PropTypes.string,
lastName: PropTypes.string,
isCorresponding: PropTypes.bool,
isSubmitting: PropTypes.bool,
affiliationNumber: PropTypes.number,
......
......@@ -102,13 +102,11 @@ export default compose(
AutosaveIndicator.propTypes = {
/** Make appear loader until save. */
autosave: PropTypes.objectOf(
PropTypes.oneOfType([PropTypes.bool, PropTypes.date, PropTypes.string]),
),
autosave: PropTypes.object, // eslint-disable-line
}
AutosaveIndicator.defaultProps = {
autosave: undefined,
autosave: {},
}
// #region styles
const Root = styled.div`
......
import React from 'react'
import PropTypes from 'prop-types'
import { has } from 'lodash'
import { isUndefined } from 'lodash'
import styled from 'styled-components'
import { Icon, H3 } from '@pubsweet/ui'
import { override, th } from '@pubsweet/ui-toolkit'
......@@ -35,7 +35,7 @@ const CustomHeader = ({
)
const ContextualBox = ({ label, children, rightChildren, ...props }) =>
has(props, 'expanded') ? (
!isUndefined(props.expanded) ? (
<ControlledAccordion
header={CustomHeader}
label={label}
......@@ -61,7 +61,7 @@ ContextualBox.propTypes = {
/** Label of the contextual box. */
label: PropTypes.string,
/** Component or html to be rendered on the right side. */
rightChildren: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),
rightChildren: PropTypes.any, // eslint-disable-line
/** The state of the contextual box. If passed from a parent then the component
* is controlled and can be expanded/collapsed remotely.
*/
......@@ -69,13 +69,12 @@ ContextualBox.propTypes = {
/** Callback function used to control the state of the component.
* To be used together with the `expanded` prop.
*/
toggle: PropTypes.func,
toggle: PropTypes.func, // eslint-disable-line
}
ContextualBox.defaultProps = {
label: '',
rightChildren: undefined,
toggle: null,
// rightChildren: undefined,
}
// #region styles
......
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