Last active
June 25, 2018 08:15
-
-
Save drenther/ab3c198dfa29b42a7b33dc4fc802d80c to your computer and use it in GitHub Desktop.
Usage of styled as a function
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
/* src/components/Loader.js */ | |
. | |
. | |
. | |
/* line 6 */ | |
const Loader = ({ className }) => (<div className={className}><Loading/></div>) | |
. | |
. | |
. | |
/* line 41 - 46 */ | |
export default styled(Loader)` | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); | |
`; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment