emotion-js / emotion-js/facepaint

How can you pass props into a component?

Open
#19 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
594
Forks
12
PR merge metrics
No merged PRs in 30d

Description

I'm using facepaint with emotion and I want to be able to pass props into a styled component. With emotion you would normally do this:
const TextColumnContainer = styled.div(props => ({
textAlign: props.align || 'center',
}));
adding a facepaint 'mq' object with all my media queries will break or ignore the css within it. How can I pass props into a styled component that is using facepaint and emotion?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.