-
Notifications
You must be signed in to change notification settings - Fork 1
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
convert herocard to tsx #852
base: typescript-conversion
Are you sure you want to change the base?
Conversation
@@ -86,7 +86,7 @@ const HeroCardTitle = styled.div` | |||
margin-bottom: ${spacing.xxsm}; | |||
`; | |||
|
|||
const HeroCardDescription = styled.div` | |||
const HeroCardDescription = styled.div<{ cardType: string }>` |
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.
seems like cardType
is one of 'learn' | 'watch'
rather than a generic string, might want to change the typing here to reflect that
4092992
to
8a2b9db
Compare
/** Image rendered as background for card. */ | ||
backgroundCloudinaryId: string, | ||
ctaUrl?: string, | ||
/** text for card CTA */ | ||
ctaText: string, | ||
/** Description text above CTA */ | ||
description: string, | ||
/** Optional: Key value that maps to a show logo. */ | ||
iconKey?: string, | ||
/** Optional: Image data that is used to render a PersonHeadShot. */ | ||
personHeadShot: PersonHeadshotPropTypes, | ||
/** Optional: Data used to render a sticker. */ | ||
sticker: PropTypes.InferProps<typeof Sticker.propTypes>, | ||
/** Title text above description */ | ||
title?: string, | ||
onClick?: () => void, | ||
|
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 should remove the comments here. It's clear from the names what the props do and the props that are optional are denoted with a ?
8a2b9db
to
6833ec6
Compare
6833ec6
to
63ca286
Compare
af1ff91
to
6662907
Compare
What does the Pr do
converts the herocard into typescript