Skip to content
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

Open
wants to merge 3 commits into
base: typescript-conversion
Choose a base branch
from
Open

Conversation

jwinnfeild2517
Copy link
Contributor

What does the Pr do

converts the herocard into typescript

@@ -86,7 +86,7 @@ const HeroCardTitle = styled.div`
margin-bottom: ${spacing.xxsm};
`;

const HeroCardDescription = styled.div`
const HeroCardDescription = styled.div<{ cardType: string }>`
Copy link
Collaborator

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

Comment on lines 157 to 173
/** 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,

Copy link
Contributor

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants