-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat(DisplayMediaCard, PosterCard): add extra #1131
Changes from 4 commits
553a4a6
e012c4f
c0e10f4
0a62224
f715407
69610e4
b600155
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1057,6 +1057,7 @@ interface CommonDisplayCardProps { | |
descriptionLinesMax?: number; | ||
'aria-label'?: string; | ||
aspectRatio?: AspectRatio | number; | ||
extra?: React.ReactNode; | ||
} | ||
|
||
type DisplayMediaCardBaseProps = { | ||
|
@@ -1086,7 +1087,6 @@ type DisplayMediaCardProps = DisplayMediaCardBaseProps & | |
>; | ||
|
||
type DisplayDataCardProps = CommonDisplayCardProps & { | ||
extra?: React.ReactNode; | ||
isInverse?: boolean; | ||
} & ExclusifyUnion< | ||
| TouchableProps | ||
|
@@ -1343,6 +1343,7 @@ interface PosterCardBaseProps { | |
subtitleLinesMax?: number; | ||
description?: string; | ||
descriptionLinesMax?: number; | ||
extra?: React.ReactNode; | ||
} | ||
|
||
interface PosterCardWithImageProps extends PosterCardBaseProps { | ||
|
@@ -1396,6 +1397,7 @@ export const PosterCard = React.forwardRef<HTMLDivElement, PosterCardProps>( | |
subtitleLinesMax, | ||
description, | ||
descriptionLinesMax, | ||
extra, | ||
variant, | ||
isInverse, | ||
backgroundColor, | ||
|
@@ -1593,6 +1595,7 @@ export const PosterCard = React.forwardRef<HTMLDivElement, PosterCardProps>( | |
</Text2> | ||
</div> | ||
)} | ||
{extra} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess it is expected to not have any spacings between the extra an the other elements. Please add some screenshot tests to verify There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, the I didn't include screenshots because we don't have screenshots in displayDataCard for extra. But I will do it! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added |
||
</div> | ||
</Box> | ||
</Box> | ||
|
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 have half of our stories using
withExtra
and the other halfextra
. Which one should we use?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.
also we have some "icon" instead of "withIcon" (in tag story for example)
perhaps it is better to create a task to solve these "purity details" across all stories.
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've created an issue for this: https://jira.tid.es/browse/WEB-1891