From 86bf1b6446544cefc81ad7f819a8d1c0715daa71 Mon Sep 17 00:00:00 2001 From: Vasek Mlejnsky Date: Fri, 24 Aug 2018 06:20:33 +0200 Subject: [PATCH] Change propTypes so multiple elements can be children of paragraph --- src/js/components/Paragraph/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/js/components/Paragraph/index.js b/src/js/components/Paragraph/index.js index 775fed3e..63a3c8b8 100644 --- a/src/js/components/Paragraph/index.js +++ b/src/js/components/Paragraph/index.js @@ -24,9 +24,11 @@ const P = ({ children, className, isSmaller = false }) => ( P.propTypes = { className: PropTypes.string, - children: PropTypes.string.isRequired, isSmaller: PropTypes.bool, + children: PropTypes.oneOfType([ + PropTypes.array, + PropTypes.string, + ]).isRequired, }; - -export default P; \ No newline at end of file +export default P;