From 30305da6231903e05da7aacf999d28ffcb65e640 Mon Sep 17 00:00:00 2001 From: Vladimir Borisov Date: Mon, 30 Sep 2019 10:53:11 +0300 Subject: [PATCH] PropTypes definitions --- .../Settings/SectionsSelector/SectionsSelector.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/routes/Settings/SectionsSelector/SectionsSelector.js b/src/routes/Settings/SectionsSelector/SectionsSelector.js index 2c1f44ced..0cfcce343 100644 --- a/src/routes/Settings/SectionsSelector/SectionsSelector.js +++ b/src/routes/Settings/SectionsSelector/SectionsSelector.js @@ -1,4 +1,5 @@ const React = require('react'); +const PropTypes = require('prop-types'); const { Button } = require('stremio/common'); const classnames = require('classnames'); const styles = require('../styles'); @@ -15,4 +16,13 @@ const SectionsSelector = ({ className, sections, selectedSectionId, onSelectedSe ); }; -module.exports = SectionsSelector; \ No newline at end of file +SectionsSelector.propTypes = { + className: PropTypes.string, + sections: PropTypes.arrayOf(PropTypes.shape({ + id: PropTypes.string.isRequired, + })), + selectedSectionId: PropTypes.string.isRequired, + onSelectedSection: PropTypes.func.isRequired, +}; + +module.exports = SectionsSelector;