diff options
Diffstat (limited to 'packages/gitbook-core/src/shapes')
-rw-r--r-- | packages/gitbook-core/src/shapes/Summary.js | 5 | ||||
-rw-r--r-- | packages/gitbook-core/src/shapes/SummaryArticle.js | 7 | ||||
-rw-r--r-- | packages/gitbook-core/src/shapes/SummaryPart.js | 5 |
3 files changed, 10 insertions, 7 deletions
diff --git a/packages/gitbook-core/src/shapes/Summary.js b/packages/gitbook-core/src/shapes/Summary.js index 7efe4e0..f97e66c 100644 --- a/packages/gitbook-core/src/shapes/Summary.js +++ b/packages/gitbook-core/src/shapes/Summary.js @@ -1,6 +1,7 @@ const React = require('react'); +const { listOf } = require('react-immutable-proptypes'); + const { - arrayOf, shape } = React.PropTypes; @@ -9,5 +10,5 @@ const Part = require('./SummaryPart'); module.exports = shape({ file: File.isRequired, - parts: arrayOf(Part).isRequired + parts: listOf(Part).isRequired }); diff --git a/packages/gitbook-core/src/shapes/SummaryArticle.js b/packages/gitbook-core/src/shapes/SummaryArticle.js index d13bb31..c5aa717 100644 --- a/packages/gitbook-core/src/shapes/SummaryArticle.js +++ b/packages/gitbook-core/src/shapes/SummaryArticle.js @@ -1,8 +1,9 @@ /* eslint-disable no-use-before-define */ -const React = require('react'); +const React = require('react'); +const { list } = require('react-immutable-proptypes'); + const { - arrayOf, string, number, shape @@ -14,7 +15,7 @@ const Article = shape({ path: string, ref: string, level: string, - articles: arrayOf(Article) + articles: list }); module.exports = Article; diff --git a/packages/gitbook-core/src/shapes/SummaryPart.js b/packages/gitbook-core/src/shapes/SummaryPart.js index 75d5602..769ddd1 100644 --- a/packages/gitbook-core/src/shapes/SummaryPart.js +++ b/packages/gitbook-core/src/shapes/SummaryPart.js @@ -1,6 +1,7 @@ const React = require('react'); +const { listOf } = require('react-immutable-proptypes'); + const { - arrayOf, string, shape } = React.PropTypes; @@ -9,5 +10,5 @@ const Article = require('./SummaryArticle'); module.exports = shape({ title: string.isRequired, - articles: arrayOf(Article) + articles: listOf(Article) }); |