-
Notifications
You must be signed in to change notification settings - Fork 734
Migrate Card & Card.Image to typescript #805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
<Image | ||
testID={testID} | ||
source={imageSource} | ||
style={[this.styles.image]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You removed imageStyle
, I need it in CardItem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do you pass the imageStyle
I couldn't find where it comes from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was just this style={[this.styles.image, imageStyle]}
, I might have forgotten to add it to the PropTypes
:S
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What not call it style
?
you mean that the user can pass from outside?
@@ -1,6 +1,6 @@ | |||
import _ from 'lodash'; | |||
|
|||
export function extractPositionValues(position) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of turning position to an enum?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think position is not a string but an array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it can be an array of enums, I have code for it, I can create a PR later and if you can decide if you like the idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, let's save it for later.. this PR is getting too messy
@@ -4,6 +4,7 @@ | |||
* Please use this file for declaring all the exports, so they could be picked up by typescript's complier | |||
*/ | |||
export * from './style'; | |||
export {default as Card} from './components/card'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might need to add some (or all) of the ones below here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is that the other types will be part of Card
Card.Image, Card.Section..
But now I see it's not working so well...
I will check it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed - I'll merge and the rest of the fix will be in a different PR.
The ImageStyle might not be needed if we go to the CardSection route.
This fix the annoying warning we're getting lately