Skip to content

Commit

Permalink
fix: Card height (#2869)
Browse files Browse the repository at this point in the history
  • Loading branch information
OverGlass committed Feb 1, 2024
1 parent 94b6ef8 commit bac85ca
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const SentEmailCampaigns = ({ isMailsStatutory = false }) => {
{campaigns.map(message => (
<Grid item key={message.id} xs={12} sm={6} md={3} lg={3} xl={3} data-cy="email-campaign-card">
<UICard
rootProps={{ sx: { height: '210px', justifyContent: 'space-between' } }}
rootProps={{ sx: { height: '100%', justifyContent: 'space-between' } }}
headerProps={{ sx: { pt: '21px' } }}
header={
<>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Phoning/Campaign/CampaignItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const CampaignItem = ({
return (
<Grid item xs={12} sm={6} md={3}>
<UICard
rootProps={{ sx: { height: '280px' } }}
rootProps={{ sx: { height: '100%' } }}
headerProps={{ sx: { pt: '21px' } }}
header={
<>
Expand Down
15 changes: 14 additions & 1 deletion src/ui/Card/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,20 @@ const UICard = ({
}) => (
<StyledCard {...rootProps} data-cy="ui-card">
{header && <CardContent {...headerProps}>{header}</CardContent>}
{content && <CardContent {...contentProps}>{content}</CardContent>}
{content && (
<CardContent
sx={
header
? {
pt: '0',
}
: {}
}
{...contentProps}
>
{content}
</CardContent>
)}
{actions && <StyledActions {...actionsProps}>{actions}</StyledActions>}
</StyledCard>
)
Expand Down

0 comments on commit bac85ca

Please sign in to comment.