Skip to content

Commit

Permalink
fix: switch name from icon to asset
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmarquesini-tlf committed Jul 19, 2023
1 parent ce14917 commit 6b3511d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/__stories__/media-card-story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const Default: StoryComponent<Args> = ({
title={title}
subtitle={subtitle}
description={description}
icon={icon}
asset={icon}
media={
media === 'video' ? (
<Video src={VIDEO_SRC} aspectRatio="16:9" dataAttributes={{qsysid: 'video'}} />
Expand Down
2 changes: 1 addition & 1 deletion src/card.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export const mediaCardContent = style([
},
]);

export const mediaCardIcon = style([
export const mediaCardAsset = style([
{
position: 'absolute',
zIndex: 1,
Expand Down
18 changes: 9 additions & 9 deletions src/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ interface MediaCardBaseProps {
subtitle?: string;
subtitleLinesMax?: number;
description?: string;
icon?: React.ReactElement
asset?: React.ReactElement;
descriptionLinesMax?: number;
extra?: React.ReactNode;
actions?: Array<CardAction>;
Expand Down Expand Up @@ -438,7 +438,7 @@ export const MediaCard = React.forwardRef<HTMLDivElement, MediaCardProps>(
title,
titleLinesMax,
description,
icon,
asset,
descriptionLinesMax,
extra,
actions,
Expand Down Expand Up @@ -488,13 +488,13 @@ export const MediaCard = React.forwardRef<HTMLDivElement, MediaCardProps>(
buttonLink={buttonLink}
/>
</div>
{icon ? (
<Box className={styles.mediaCardIcon} paddingX={16} paddingY={16}>
{icon}
</Box>
): (
<Box paddingBottom={actions?.length || onClose ? 64 : 0} />
)}
{asset ? (
<Box className={styles.mediaCardAsset} paddingX={16} paddingY={16}>
{asset}
</Box>
) : (
<Box paddingBottom={actions?.length || onClose ? 64 : 0} />
)}
</div>
</BaseTouchable>
</Boxed>
Expand Down

0 comments on commit 6b3511d

Please sign in to comment.