From 49f5fedb526fc2acd8da165052dc62bf5f5cd3a1 Mon Sep 17 00:00:00 2001 From: John Persson Date: Sun, 11 Mar 2018 22:56:23 +0100 Subject: [PATCH] fix(lib): correct propTypes --- src/column.jsx | 5 ++++- src/row.jsx | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/column.jsx b/src/column.jsx index 2668055..b752c8b 100644 --- a/src/column.jsx +++ b/src/column.jsx @@ -97,7 +97,9 @@ const columnPropTypes = { Column.propTypes = { styledFlexboxGrid: shape(propTypes.styledFlexboxGrid), - theme: shape({}), + theme: shape({ + styledFlexboxGrid: shape(propTypes.styledFlexboxGrid), + }), ...columnPropTypes, }; @@ -106,6 +108,7 @@ Column.defaultProps = { // hidden: false, // debug: false, // auto: false, + theme: shape({}), styledFlexboxGrid: undefined, }; diff --git a/src/row.jsx b/src/row.jsx index 0c38ebd..6c0863a 100644 --- a/src/row.jsx +++ b/src/row.jsx @@ -37,6 +37,7 @@ const Row = (props) => { const { breakpoints, rowWidth, getGutterWidth, getColumnWidth, } = styledFlexboxGrid; + console.log(props.theme); const RowhResponsiveProps = withResponsiveProps(StyledRow, { align: alignColumns, @@ -76,7 +77,7 @@ const rowPropTypes = { // Responsive props theme: shape({ styledFlexboxGrid: shape(propTypes.styledFlexboxGrid), - }).isRequired, + }), align: oneOfType([oneOf(validAlignProps), objectOf(oneOf(validAlignProps))]), justify: oneOfType([oneOf(validJustifyProps), objectOf(oneOf(validJustifyProps))]), direction: oneOfType([ @@ -93,6 +94,7 @@ Row.defaultProps = { align: undefined, justify: undefined, direction: undefined, + theme: shape({}), fullWidth: false, center: true, debug: false,