Skip to content

Commit 5776ff0

Browse files
Gallery image caption titles
1 parent 576c149 commit 5776ff0

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

dotcom-rendering/src/components/CaptionText.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,19 @@ const renderTextElement = (node: Node, key: number): ReactNode => {
2222
const children = Array.from(node.childNodes).map(renderTextElement);
2323

2424
switch (node.nodeName) {
25+
case 'H2':
26+
return text === '' ? null : (
27+
<h2
28+
css={css`
29+
display: block;
30+
${headlineMedium17}
31+
padding: ${space[2]}px 0 ${space[3]}px;
32+
`}
33+
key={key}
34+
>
35+
{children}
36+
</h2>
37+
);
2538
case 'STRONG':
2639
return text === '' ? null : (
2740
<strong

dotcom-rendering/src/components/GalleryCaption.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const styles = css`
2121
color: ${palette('--caption-text')};
2222
${textSans12}
2323
padding-bottom: ${space[6]}px;
24-
padding-top: ${space[5]}px;
2524
2625
${between.tablet.and.desktop} {
2726
padding-left: ${space[5]}px;

0 commit comments

Comments
 (0)