11import { css } from '@emotion/react' ;
22import { between , from , space , until } from '@guardian/source/foundations' ;
3+ import { Hide } from '@guardian/source/react-components' ;
34import { StraightLines } from '@guardian/source-development-kitchen/react-components' ;
45import type { FEArticle } from '../frontend/feArticle' ;
56import { interactiveLegacyClasses } from '../layouts/lib/interactiveLegacyStyling' ;
@@ -17,6 +18,7 @@ import type { FEElement } from '../types/content';
1718import type { Podcast , TagType } from '../types/tag' ;
1819import { Avatar } from './Avatar' ;
1920import { Branding } from './Branding.importable' ;
21+ import { Caption } from './Caption' ;
2022import { CommentCount } from './CommentCount.importable' ;
2123import { useConfig } from './ConfigContext' ;
2224import { Contributor } from './Contributor' ;
@@ -41,6 +43,7 @@ type Props = {
4143 isCommentable : boolean ;
4244 mainMediaElements ?: FEElement [ ] ;
4345 crossword ?: FEArticle [ 'crossword' ] ;
46+ captionText ?: string ;
4447} ;
4548
4649const meta = ( format : ArticleFormat ) => {
@@ -324,6 +327,7 @@ export const ArticleMeta = ({
324327 isCommentable,
325328 mainMediaElements,
326329 crossword,
330+ captionText,
327331} : Props ) => {
328332 const soleContributor = getSoleContributor ( tags , byline ) ;
329333 const authorName = soleContributor ?. title ?? 'Author Image' ;
@@ -404,6 +408,21 @@ export const ArticleMeta = ({
404408 />
405409 ) }
406410
411+ { format . design === ArticleDesign . Gallery ? (
412+ < Hide from = "leftCol" >
413+ < Caption
414+ captionText = { captionText }
415+ format = { format }
416+ isMainMedia = { true }
417+ />
418+ < StraightLines
419+ cssOverrides = { stretchLines }
420+ count = { 4 }
421+ color = { themePalette ( '--straight-lines' ) }
422+ />
423+ </ Hide >
424+ ) : null }
425+
407426 { crossword ?. creator && (
408427 < CrosswordSetter
409428 setter = { crossword . creator . name }
0 commit comments