Skip to content

Conversation

davvidbaker
Copy link
Contributor

It's a pretty common pattern that to do something like

<Wrapper>
  {this.state.isVisible && <Child />}
  <OtherElement />
</Wrapper>

This PR makes that possible within the <SplitPane /> component. It does this by filtering out all falsy children elements before mapping or reducing over them.

Let me know what you think, and thanks for all your hard work!

Copy link
Collaborator

@wuweiweiwu wuweiweiwu left a comment

Choose a reason for hiding this comment

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

Hi Thanks again for contributing!

Do you mind removing the storybook? I don't believe we currently have a storybook in place

@davvidbaker
Copy link
Contributor Author

Do you mind removing the storybook?

For sure. Sorry for the extra commits. Stupid line at end of file kept not deleting.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.08%) to 93.548% when pulling 93d07cd on davvidbaker:v2 into 22e649c on tomkp:v2.

@wuweiweiwu
Copy link
Collaborator

wuweiweiwu commented Jul 26, 2018

@davvidbaker should this be based off of master instead?

Can you also do the same PR for master? :)

@davvidbaker
Copy link
Contributor Author

Can you also do the same PR for master? :)

#307 👍

@wuweiweiwu wuweiweiwu merged commit 9c49aad into tomkp:v2 Jul 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants