refactor(user-profile): use styled-components (#534)#577
refactor(user-profile): use styled-components (#534)#577dillansimmons wants to merge 1 commit intogitpoint:masterfrom dillansimmons:styled-user-profile
Conversation
chinesedfan
left a comment
There was a problem hiding this comment.
@dillansimmons Hope my comments can help you. :)
| color: ${colors.white}; | ||
| font-family: ${styledFonts.fontPrimaryBold}; | ||
| font-size: ${normalize(16)}; | ||
| margin-bottom: 2px; |
There was a problem hiding this comment.
We prefer unitless styles, except for shorthands properties.
| (initialUser.type === 'User' || user.type === 'User') && { | ||
| borderColor: colors.white, | ||
| borderWidth: 2, | ||
| }, |
There was a problem hiding this comment.
@dillansimmons I think you can design a prop for StyledImageZoom. For example,
const StyledImageZoom = styled(ImageZoom)`
// blabla
${({isUser}) => { /* additional styles */}}
`;
// in render
<StyledImageZoom isUser={initialUser.type === 'User' || user.type === 'User'}></StyledImageZoom>
|
Hey @dillansimmons, friendly ping, are you still up for this? We're trying to close the styled-components migration 😄 |
|
Hey @machour, yeah I've stalled out on this. I get the error: Happy to let someone else take a shot at this, not a styled components expert by any means. |
@dillansimmons I finished your work in #724. The error is due to the import sequence. And we are always glad to see your other new PRs! |
|
#724 got merged, closing this PR. |
A little unclear what the best method for passing styling to the
ImageZoomcomponent based on if user was logged in.