PropTypes definitions

This commit is contained in:
Vladimir Borisov 2019-09-30 10:53:11 +03:00
parent 56fd4e1a78
commit 30305da623
No known key found for this signature in database
GPG key ID: F9A584BE4FCB6603

View file

@ -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;
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;