Last active
June 28, 2017 11:17
-
-
Save nicreichert/34d721234c229ca41711848e5b2a988a to your computer and use it in GitHub Desktop.
This file contains 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, { Component } from 'react'; | |
import styled from 'styled-components'; | |
const Wrapper = styled.div` | |
border-radius: 5px; | |
border: 1px solid #FAFAFA; | |
/* whatever other rules apply */ | |
`; | |
const styledHoc = (WrappedComponent) => { | |
class StyledHoc extends Component { | |
render() { | |
return ( | |
<Wrapper> | |
<WrappedComponent {...this.props} /> | |
</Wrapper> | |
); | |
} | |
} | |
}; | |
export default styledHoc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment