Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

fix(FlexItem): fix children type #1320

Merged
merged 6 commits into from
May 13, 2019
Merged

Conversation

mnajdova
Copy link
Contributor

@mnajdova mnajdova commented May 10, 2019

FIxing this console warning:

react.development.js:2726 Warning: Failed prop type: Invalid prop `children` supplied to `FlexItem`, expected a ReactNode.
    in FlexItem (created by ComponentExampleKnobs)
    in ComponentExampleKnobs (created by KnobInspector)
    in KnobInspector (created by ComponentExample)
    in div (created by Segment)
    in Segment (created by ComponentExample)
    in KnobProvider (created by ComponentExample)
    in FlexItem (created by ComponentExample)
    in div (created by Flex)
    in Flex (created by ComponentExample)
    in ComponentExample (created by ComponentSourceManager)
   ...

@codecov
Copy link

codecov bot commented May 10, 2019

Codecov Report

Merging #1320 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1320   +/-   ##
=======================================
  Coverage   72.32%   72.32%           
=======================================
  Files         759      759           
  Lines        5692     5692           
  Branches     1687     1663   -24     
=======================================
  Hits         4117     4117           
  Misses       1569     1569           
  Partials        6        6
Impacted Files Coverage Δ
packages/react/src/components/Flex/FlexItem.tsx 78.57% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bca7430...62eeea4. Read the comment docs.

@@ -49,9 +50,12 @@ class FlexItem extends UIComponent<ReactProps<FlexItemProps>> {

static propTypes = {
...commonPropTypes.createCommon({
children: false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: children argument in createCommon can be boolean or string. Would it make sense to pass direct value (like you do on line 57) as well (or instead of the string)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's an interesting question. I can add as a separate PR options for passing direct value for the children and content options.

@codecov
Copy link

codecov bot commented May 13, 2019

Codecov Report

Merging #1320 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1320   +/-   ##
=======================================
  Coverage   72.33%   72.33%           
=======================================
  Files         759      759           
  Lines        5694     5694           
  Branches     1664     1688   +24     
=======================================
  Hits         4119     4119           
  Misses       1569     1569           
  Partials        6        6
Impacted Files Coverage Δ
packages/react/src/components/Flex/FlexItem.tsx 78.57% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 13da159...96430b4. Read the comment docs.

@mnajdova mnajdova merged commit 5c2688a into master May 13, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix/flex-item-children-type branch May 13, 2019 15:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants