diff --git a/dotcom-rendering/src/components/Card/Card.tsx b/dotcom-rendering/src/components/Card/Card.tsx index 441abde4907..5ba1c0efb66 100644 --- a/dotcom-rendering/src/components/Card/Card.tsx +++ b/dotcom-rendering/src/components/Card/Card.tsx @@ -38,7 +38,6 @@ import { CardPicture } from '../CardPicture'; import { Island } from '../Island'; import { LatestLinks } from '../LatestLinks.importable'; import { LoopVideo } from '../LoopVideo.importable'; -import { MediaMeta } from '../MediaMeta'; import { Pill } from '../Pill'; import { Slideshow } from '../Slideshow'; import { SlideshowCarousel } from '../SlideshowCarousel.importable'; @@ -550,8 +549,7 @@ export const Card = ({ - */ const isMediaCardOrNewsletter = isMediaCard(format) || isNewsletter; - // Currently pills are only shown within beta containers. - const showPill = isBetaContainer && isMediaCardOrNewsletter; + const showPill = isMediaCardOrNewsletter; const media = getMedia({ imageUrl: image?.src, @@ -795,15 +793,6 @@ export const Card = ({ cardHasImage={!!image} /> ) : null} - {!showPill && - !!mainMedia && - mainMedia.type !== 'Video' && - mainMedia.type !== 'LoopVideo' && ( - - )} )} @@ -821,7 +810,7 @@ export const Card = ({ * Waveform for podcasts is absolutely positioned at bottom of * card, behind everything else */} - {isBetaContainer && mainMedia?.type === 'Audio' && ( + {mainMedia?.type === 'Audio' && (
) : null} - {!showPill && - !!mainMedia && - mainMedia.type !== 'Video' && ( - - )} )} diff --git a/dotcom-rendering/src/components/MediaMeta.tsx b/dotcom-rendering/src/components/MediaMeta.tsx deleted file mode 100644 index 0c3cafcda92..00000000000 --- a/dotcom-rendering/src/components/MediaMeta.tsx +++ /dev/null @@ -1,68 +0,0 @@ -import { css } from '@emotion/react'; -import { - SvgAudio, - SvgCamera, - SvgVideo, -} from '@guardian/source/react-components'; -import { palette as themePalette } from '../palette'; -import type { MainMedia } from '../types/mainMedia'; - -type Props = { - mediaType: MainMedia['type']; - hasKicker: boolean; -}; - -const iconWrapperStyles = (hasKicker: boolean) => css` - width: 24px; - height: 24px; - /* We’re using the text colour for the icon badge */ - background-color: ${hasKicker - ? themePalette('--card-kicker-text') - : themePalette('--card-footer-text')}; - border-radius: 50%; - display: inline-block; - - > svg { - width: 20px; - height: 20px; - margin-left: auto; - margin-right: auto; - margin-top: 2px; - display: block; - fill: ${themePalette('--card-media-icon')}; - } -`; - -const wrapperStyles = css` - display: flex; - align-items: center; - margin-top: 4px; -`; - -export const Icon = ({ mediaType }: { mediaType: Props['mediaType'] }) => { - switch (mediaType) { - case 'Gallery': - return ; - case 'Video': - case 'LoopVideo': - return ; - case 'Audio': - return ; - } -}; - -const MediaIcon = ({ mediaType, hasKicker }: Props) => { - return ( - - - - ); -}; - -export const MediaMeta = ({ mediaType, hasKicker }: Props) => { - return ( -
- -
- ); -};