DEV Community

Discussion on: Styling in React

Collapse
 
seanmclem profile image
Seanmclem

But you don't have to pass them in to a function manually? They're just automatically available on the styled.div template string as a "props" object?

Thread Thread
 
dastasoft profile image
dastasoft

That's correct, they're available on the styled.div because you pass the props when you use the component in the JSX, check the example provided in the official webpage: styled-components.com/

Thread Thread
 
seanmclem profile image
Seanmclem

Thanks, I see now. They're the actual props passed to the styled component. Since the library creates components and not just styles