Skip to content

Commit

Permalink
Merge pull request #90 from aceleradora-TW/81/fix-padronizar-imagens
Browse files Browse the repository at this point in the history
81/fix padronizar imagens
  • Loading branch information
daniellemadrid authored Oct 22, 2024
2 parents 55ff46c + 33bad30 commit fdae159
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/components/BaseCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import { theme } from "../../app/config/theme"
import { ClickButton } from "../ClickButton"

interface CardProps{
title: string
description?: string
textImage?: string
image?: string
route: string
title: string;
description?: string;
textImage: string;
image?: string;
route: string;
}

const cardStyles = {
Expand Down Expand Up @@ -41,7 +41,13 @@ export const BaseCard: React.FC<CardProps> = ({title, description, textImage, im
component="img"
image={image}
alt={textImage}
sx={theme.customStyles.cardMedia}
sx={{
width: '100%',
height: 'auto',
maxHeight: 210,
objectFit: 'cover'
}}

/>
)}
<CardContent sx={theme.customStyles.cardContent}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const ContainerCardTheme: React.FC<ContainerCardThemeProps> = ({data, cat
description={field.cardDescription}
route={`${currentPath}/${element.id}-${field.title}`}
image={field.image ? field.image[0].url : ""}
textImage={`${field.alt}`}
/>
</Grid>
);
Expand Down
1 change: 1 addition & 0 deletions src/types/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export interface ThemeField extends CommonField {
topics: string;
category: string;
topicsDescription: string;
alt: string;
}

export interface TopicField extends CommonField {
Expand Down

0 comments on commit fdae159

Please sign in to comment.