Skip to content

Commit

Permalink
pass through fairground container logic
Browse files Browse the repository at this point in the history
  • Loading branch information
abeddow91 committed Dec 3, 2024
1 parent 932d55a commit 3b67c41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions dotcom-rendering/src/components/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ export const Card = ({
imageType={media?.type}
containerType={containerType}
gapSize={getGapSize()}
isFairgroundContainer={isFairgroundContainer}
>
{media && (
<ImageWrapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { isUndefined } from '@guardian/libs';
import { from, space, until } from '@guardian/source/foundations';
import type { DCRContainerType } from '../../../types/front';
import type { CardImageType } from '../../../types/layout';
import { FAIRGROUND_CONTAINERS } from '../Card';
import type { ImagePositionType } from './ImageWrapper';

const padding = 20;
Expand All @@ -19,6 +18,7 @@ type Props = {
minWidthInPixels?: number;
containerType?: DCRContainerType;
gapSize?: GapSize;
isFairgroundContainer: boolean;
};

const containerStyles = css`
Expand Down Expand Up @@ -166,10 +166,8 @@ export const CardLayout = ({
imageType,
containerType,
gapSize = 'small',
isFairgroundContainer,
}: Props) => {
const isFairgroundContainer = FAIRGROUND_CONTAINERS.includes(
containerType ?? '',
);
return (
<div
css={[
Expand Down

0 comments on commit 3b67c41

Please sign in to comment.