Skip to content

Instantly share code, notes, and snippets.

@dbilgili
Created December 9, 2018 21:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbilgili/d624c45dee8cba805ea16b3b644909ba to your computer and use it in GitHub Desktop.
Save dbilgili/d624c45dee8cba805ea16b3b644909ba to your computer and use it in GitHub Desktop.
// vim: syntax=JSX
import React from 'react'
class Select extends React.Component{
static displayName = "Select"
render(){
const { children, open } = this.props
return React.cloneElement(children, {onClick: open})
}
}
export default Select
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment