Styled Components - arthur791004/notes GitHub Wiki

Styling any components

  • The styled method works perfectly on all of your own or any third-party components as well, as long as they're accepting the className prop.

styled() v.s extend

  • This is different from passing your styled component into the styled() factory. Calling extend creates a new stylesheet by extending the old one, and thus doesn't generate two classes for a single component.

withComponent

  • change which tag or component a styled component renders

.attrs

innerRef

  • The styled method works perfectly on all of your own or any third-party components as well, as long as they're accepting the className prop.