Skip to content

Instantly share code, notes, and snippets.

@drenther
Last active June 25, 2018 08:15
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 drenther/ab3c198dfa29b42a7b33dc4fc802d80c to your computer and use it in GitHub Desktop.
Save drenther/ab3c198dfa29b42a7b33dc4fc802d80c to your computer and use it in GitHub Desktop.
Usage of styled as a function
/* 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