Create component variations in React with styled-components and "extend"

Share this video with your friends

Send Tweet

In this lesson, we extend the styles of a base button component to create multiple variations of buttons, using "extend". We can then modify the base styles in one place, and have all button types updated.

Dimitar Belchev
Dimitar Belchev
~ 6 years ago

Component.extend has already been deprecated. Use styled(<Component>) instead.

Dimitar Belchev
Dimitar Belchev
~ 6 years ago

styled(<Component>)

Dimitar Belchev
Dimitar Belchev
~ 6 years ago

styled(< Component >)