Created
October 9, 2015 16:55
-
-
Save haldun/935dd22d5405b07735c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import classNames from 'classnames'; | |
export default class ListField extends React.Component { | |
render() { | |
const classes = classNames({ | |
'list-field': true | |
}); | |
return ( | |
<div className={classes}> | |
ListField | |
</div> | |
); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
export default function WrapItemComponent(Component) { | |
return class Wrapper extends React.Component { | |
render() { | |
return ( | |
<div className="panel panel-default" onClick={this.props.onClick}> | |
{this.props.activeItemIndex} | |
<Component {...this.props} {...this.state} /> | |
</div> | |
); | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment