Skip to content

Instantly share code, notes, and snippets.

@jportella93
Last active September 25, 2020 22:53
Show Gist options
  • Save jportella93/18bcc825710513ef7243e42c9941e0a9 to your computer and use it in GitHub Desktop.
Save jportella93/18bcc825710513ef7243e42c9941e0a9 to your computer and use it in GitHub Desktop.
git branch | egrep -v 'master|feat/something-neat' | xargs git branch -D
// Create a layout component, that render children on slots.
const SplitPane = ({ leftComponent, rightComponent }) => (
<div className="SplitPane">
<div className="SplitPane-left">{leftComponent}</div>
<div className="SplitPane-right">{rightComponent}</div>
</div>
)
const App = () => <SplitPane left={<Contacts />} right={<Chat />} />
const SplitPane = ({ leftComponent, rightComponent }) => (
<div className="SplitPane">
<div className="SplitPane-left">{leftComponent}</div>
<div className="SplitPane-right">{rightComponent}</div>
</div>
)
SplitPane.propTypes = {
leftComponent: PropTypes.oneOfType([PropTypes.node, PropTypes.element]),
rightComponent: PropTypes.oneOfType([PropTypes.node, PropTypes.element]),
}
// Anything that can be rendered: numbers, strings, elements or an array
// (or fragment) containing these types.
optionalNode: PropTypes.node,
// A React element (ie. <MyComponent />).
optionalElement: PropTypes.element,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment