refactor: migrate notifications screen to styled-components#684
refactor: migrate notifications screen to styled-components#684housseindjirdeh merged 1 commit intogitpoint:masterfrom ZahraTee:styled-components-notifications-screen
Conversation
machour
left a comment
There was a problem hiding this comment.
A little question here too :)
| ]} | ||
| > | ||
| <Text style={styles.noneTitle}> | ||
| <TextContainer height={contentBlockHeight}> |
There was a problem hiding this comment.
Shouldn't TextContainer styled definition read and apply the height prop?
There was a problem hiding this comment.
I thought that too but I found that you actually don't need to... It seems that styled.Views can apply values (including height) passed in as props directly and handles null values better. I built out a small example here: https://snack.expo.io/Bys9FZumz
I can change it if it's more explicit but I thought leaving it like this is a bit neater.
There was a problem hiding this comment.
styled-components pass on all their props.
From documents, I learned something new. :)
housseindjirdeh
left a comment
There was a problem hiding this comment.
This looks perfect, thank you @ZahraTee 🎉
Screenshots
Part of #532.