More correct way to define a property in propTypes

This commit is contained in:
Vladimir Borisov 2019-10-02 18:11:16 +03:00
parent 51c8c2d74a
commit 3dfe8a05a4
No known key found for this signature in database
GPG key ID: F9A584BE4FCB6603

View file

@ -37,10 +37,7 @@ ModalDialog.propTypes = {
className: PropTypes.string,
title: PropTypes.string,
buttons: PropTypes.arrayOf(PropTypes.shape({
label: PropTypes.oneOfType([
PropTypes.string,
PropTypes.object,
]),
label: PropTypes.node,
icon: PropTypes.string,
props: PropTypes.object // Button.propTypes unfortunately these are not defined
})),