From 4d6055b9b86dc06da58f828b34e75025647ba7d4 Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Wed, 15 Nov 2017 19:53:58 +0100 Subject: [PATCH 1/2] Correct prop type --- client/coral-framework/components/Slot.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/coral-framework/components/Slot.js b/client/coral-framework/components/Slot.js index f4fecb1c7..0d0bdba6b 100644 --- a/client/coral-framework/components/Slot.js +++ b/client/coral-framework/components/Slot.js @@ -90,7 +90,10 @@ Slot.propTypes = { inline: PropTypes.bool, className: PropTypes.string, reduxState: PropTypes.object, - defaultComponent: PropTypes.component, + defaultComponent: PropTypes.oneOfType([ + PropTypes.component, + PropTypes.string, + ]), /** * You may specify the component to use as the root wrapper. From 315d3babde1b32b1fa199e0f17596be72037c013 Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Wed, 15 Nov 2017 20:03:41 +0100 Subject: [PATCH 2/2] Correct prop types 2 --- client/coral-framework/components/Slot.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/coral-framework/components/Slot.js b/client/coral-framework/components/Slot.js index 0d0bdba6b..e1acd82f4 100644 --- a/client/coral-framework/components/Slot.js +++ b/client/coral-framework/components/Slot.js @@ -91,7 +91,7 @@ Slot.propTypes = { className: PropTypes.string, reduxState: PropTypes.object, defaultComponent: PropTypes.oneOfType([ - PropTypes.component, + PropTypes.func, PropTypes.string, ]), @@ -99,7 +99,10 @@ Slot.propTypes = { * You may specify the component to use as the root wrapper. * Defaults to 'div'. */ - component: PropTypes.any, + component: PropTypes.oneOfType([ + PropTypes.func, + PropTypes.string, + ]), // props coming from graphql must be passed through this property. queryData: PropTypes.object,