refactor: parallax scroll to styled components#607
Conversation
machour
left a comment
There was a problem hiding this comment.
@shmesa22 looks good aside from the small comment I left you. Nice work.
| const Background = styled.View` | ||
| position: absolute; | ||
| top: 0; | ||
| background-color: red; |
| const Background = styled.View` | ||
| position: absolute; | ||
| top: 0; | ||
| background-color: red; |
There was a problem hiding this comment.
Should be colors.primaryDark I believe.
machour
left a comment
There was a problem hiding this comment.
@shmesa22 had more time to review, left you two more changes request.
Could you take care of those? I'll merge this baby in once done.
Thank you!
| position: absolute; | ||
| top: 0; | ||
| background-color: ${colors.primaryDark}; | ||
| ${props => props.style}; |
There was a problem hiding this comment.
@shmesa22 after a second read, as style now only contain the height, could you rename the prop to height, and use it in this style? (height: ${props => props.height})
I think it would be more clear
|
|
||
| const StickySectionText = styled.Text` | ||
| color: ${colors.white}; | ||
| ${fonts.fontPrimaryBold}; |
There was a problem hiding this comment.
use styledFonts instead of fonts from config/, with font-family: ${styledFonts.fontPrimaryBold}
machour
left a comment
There was a problem hiding this comment.
Hi @shmesa22
Sorry for the long time I took getting back to you 😞
I tested your PR and is working fine as long as you substitute styledFonts with fonts (we removed styledFonts this week)
Left you review comments to explain the changes, could you take care of them? 🙏
I'd happily merge this PR and do the changes myself if you're too busy, no worries!
| import styled from 'styled-components/native'; | ||
|
|
||
| import { colors, fonts, normalize } from 'config'; | ||
| import { colors, normalize, styledFonts } from 'config'; |
There was a problem hiding this comment.
use fonts instead of styledFonts (removed)
|
|
||
| const StickySectionText = styled.Text` | ||
| color: ${colors.white}; | ||
| font-family: ${styledFonts.fontPrimaryBold}; |
There was a problem hiding this comment.
instead of:
font-family: ${styledFonts.fontPrimaryBold};
use:
${fonts.fontPrimaryBold}; (without specifying font-family)
|
Thank you @shmesa22 !! |
Screenshots
Description
Migrated
ParallaxScrollto styled-components