Browse Source

Sync React component propTypes with options.

Renée Kooi 7 years ago
parent
commit
fac8257fae
4 changed files with 19 additions and 7 deletions
  1. 4 2
      src/react/DashboardModal.js
  2. 2 1
      src/react/ProgressBar.js
  3. 4 1
      src/react/StatusBar.js
  4. 9 3
      src/react/propTypes.js

+ 4 - 2
src/react/DashboardModal.js

@@ -1,7 +1,7 @@
 const React = require('react')
 const PropTypes = require('prop-types')
 const DashboardPlugin = require('../plugins/Dashboard')
-const basePropTypes = require('./propTypes')
+const basePropTypes = require('./propTypes').dashboard
 
 const h = React.createElement
 
@@ -61,7 +61,9 @@ DashboardModal.propTypes = Object.assign({
   // Only check this prop type in the browser.
   target: typeof window !== 'undefined' ? PropTypes.instanceOf(window.HTMLElement) : PropTypes.any,
   open: PropTypes.bool,
-  onRequestClose: PropTypes.func
+  onRequestClose: PropTypes.func,
+  closeModalOnClickOutside: PropTypes.bool,
+  disablePageScrollWhenModalOpen: PropTypes.bool
 }, basePropTypes)
 
 DashboardModal.defaultProps = {

+ 2 - 1
src/react/ProgressBar.js

@@ -41,7 +41,8 @@ class ProgressBar extends React.Component {
 
 ProgressBar.propTypes = {
   uppy: uppyPropType,
-  fixed: PropTypes.bool
+  fixed: PropTypes.bool,
+  hideAfterFinish: PropTypes.bool
 }
 ProgressBar.defaultProps = {
 }

+ 4 - 1
src/react/StatusBar.js

@@ -1,4 +1,5 @@
 const React = require('react')
+const PropTypes = require('prop-types')
 const StatusBarPlugin = require('../plugins/StatusBar')
 const uppyPropType = require('./propTypes').uppy
 
@@ -40,7 +41,9 @@ class StatusBar extends React.Component {
 }
 
 StatusBar.propTypes = {
-  uppy: uppyPropType
+  uppy: uppyPropType,
+  hideAfterFinish: PropTypes.bool,
+  showProgressDetails: PropTypes.bool
 }
 StatusBar.defaultProps = {
 }

+ 9 - 3
src/react/propTypes.js

@@ -25,17 +25,23 @@ const metaFields = PropTypes.arrayOf(metaField)
 const dashboard = {
   uppy,
   inline: PropTypes.bool,
+  plugins,
   width: PropTypes.number,
   height: PropTypes.number,
   showProgressDetails: PropTypes.bool,
   hideUploadButton: PropTypes.bool,
+  hideProgressAfterFinish: PropTypes.bool,
   note: PropTypes.string,
-  plugins,
-  locale,
-  metaFields
+  metaFields,
+  proudlyDisplayPoweredByUppy: PropTypes.bool,
+  disableStatusBar: PropTypes.bool,
+  disableInformer: PropTypes.bool,
+  disableThumbnailGenerator: PropTypes.bool,
+  locale
 }
 
 module.exports = {
   uppy,
+  locale,
   dashboard
 }