emotion-js/facepaint

How can you pass props into a component?

Skytrobb opened this issue ยท 2 comments

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?

tkh44 commented

tkh44, you are a lifesaver.