@@ -35,6 +35,7 @@ type Props = {
3535
3636type IconProps = {
3737 format : ArticleFormat ;
38+ isMainMedia ?: boolean ;
3839} ;
3940
4041const captionStyle = ( isMainMedia : boolean ) => css `
@@ -169,8 +170,10 @@ const hideIconBelowLeftCol = css`
169170const pictureRatio = ( 13 / 18 ) * 100 ;
170171const videoRatio = ( 23 / 36 ) * 100 ;
171172
172- const iconStyle = css `
173- fill: ${ palette ( '--caption-text' ) } ;
173+ const iconStyle = ( isMainMedia ?: boolean ) => css `
174+ fill: ${ isMainMedia
175+ ? palette ( '--caption-main-media-text' )
176+ : palette ( '--caption-text' ) } ;
174177 margin- right: ${ space [ 1 ] } px;
175178 dis play: inline-block;
176179 position: relative;
@@ -248,11 +251,11 @@ const galleryStyles = css`
248251 }
249252` ;
250253
251- const CameraIcon = ( { format } : IconProps ) => {
254+ const CameraIcon = ( { format, isMainMedia } : IconProps ) => {
252255 return (
253256 < span
254257 css = { [
255- iconStyle ,
258+ iconStyle ( isMainMedia ) ,
256259 format . display === ArticleDisplay . Immersive &&
257260 hideIconBelowLeftCol ,
258261 ] }
@@ -262,11 +265,11 @@ const CameraIcon = ({ format }: IconProps) => {
262265 ) ;
263266} ;
264267
265- const VideoIcon = ( { format } : IconProps ) => {
268+ const VideoIcon = ( { format, isMainMedia } : IconProps ) => {
266269 return (
267270 < span
268271 css = { [
269- iconStyle ,
272+ iconStyle ( isMainMedia ) ,
270273 format . display === ArticleDisplay . Immersive &&
271274 hideIconBelowLeftCol ,
272275 videoIconStyle ,
@@ -320,9 +323,9 @@ export const Caption = ({
320323 data-spacefinder-role = "inline"
321324 >
322325 { mediaType === 'YoutubeVideo' || mediaType === 'SelfHostedVideo' ? (
323- < VideoIcon format = { format } />
326+ < VideoIcon format = { format } isMainMedia = { isMainMedia } />
324327 ) : (
325- < CameraIcon format = { format } />
328+ < CameraIcon format = { format } isMainMedia = { isMainMedia } />
326329 ) }
327330 { ! ! captionText && (
328331 < span
0 commit comments