Skip to content

Commit

Permalink
chore(Viewer): Add props description on ViewerContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
JF-Cozy committed Dec 1, 2022
1 parent 1789757 commit f1274dd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions react/Viewer/ViewerContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ ViewerContainer.propTypes = {
onCloseRequest: PropTypes.func,
/** Called with (nextFile, nextIndex) when the user requests to navigate to another file */
onChangeRequest: PropTypes.func,
/** Toolbar properties */
toolbarProps: PropTypes.shape(toolbarPropsPropType),
/** Whether to show left and right arrows to navigate between files */
showNavigation: PropTypes.bool,
Expand All @@ -91,6 +92,13 @@ ViewerContainer.propTypes = {
/** To open the Only Office file */
opener: PropTypes.func
}),
/** Edit path by model properties */
editPathByModelProps: PropTypes.shape({
/** URL used to edit the file when editing a `information` type metadata (text, date) */
information: PropTypes.string,
/** URL used to edit the file when editing a `page` type metadata (side of the document) */
page: PropTypes.string
}),
/** Show/Hide the panel containing more information about the file only on Desktop */
disablePanel: PropTypes.bool,
/** Show/Hide the panel containing more information about the file only on Phone & Tablet devices */
Expand Down
3 changes: 2 additions & 1 deletion react/Viewer/proptypes.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import PropTypes from 'prop-types'

export const toolbarPropsPropType = {
/** Whether to show the toolbar or not. Note that the built-in close button is in the toolbar. */
/** Whether to show the toolbar or not. Note that the built-in close button is in the toolbar */
showToolbar: PropTypes.bool,
/** Whether to show close button in toolbar */
showClose: PropTypes.bool,
/** React reference of the toolbar node */
toolbarRef: PropTypes.object
}

0 comments on commit f1274dd

Please sign in to comment.