feat(styling): add styled components#495
Conversation
Waiting to merge gitpoint/git-point#495 this one before merging this change! Thanks for creating this library, it's awesome!
| }); | ||
| const Container = styled.View` | ||
| align-items: center; | ||
| background-color: ${() => colors.white} |
There was a problem hiding this comment.
@alejandronanez I am not sure. Can it just be background-color: 'white'; ?
There was a problem hiding this comment.
Doing it this way makes it so we can change the white color everywhere by just changing a single value. However, why can't we just do ${colors.white} @alejandronanez?
There was a problem hiding this comment.
Hey @chinesedfan
- We should avoid at all costs using plain strings for colors, that's not a good practice.
- We already have a
colorsfile that we should keep using.
There was a problem hiding this comment.
@alejandronanez Yes, my point is the anonymous function, as @andrewda mentioned. (You merged so quickly. 😆 )
There was a problem hiding this comment.
@andrewda you're right! There you go https://github.com/gitpoint/git-point/pull/497/files
There was a problem hiding this comment.
Oh, I put a fix for that too @chinesedfan! :)
Adding
styled-componentsinitial work! 🙌