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

81/fix padronizar imagens #90

Merged
merged 3 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading