Skip to content

Commit bd47c58

Browse files
authored
Merge pull request #1677 from dxc-technology/gomezivann/image-examples
New Image tokens and examples added
2 parents 75be8bf + e472505 commit bd47c58

File tree

10 files changed

+8946
-944
lines changed

10 files changed

+8946
-944
lines changed

lib/src/common/variables.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,11 @@ export const componentTokens = {
492492
},
493493
image: {
494494
captionFontColor: CORE_TOKENS.color_grey_900,
495+
captionFontFamily: CORE_TOKENS.type_sans,
496+
captionFontSize: CORE_TOKENS.type_scale_02,
497+
captionFontStyle: CORE_TOKENS.type_normal,
498+
captionFontWeight: CORE_TOKENS.type_regular,
499+
captionLineHeight: CORE_TOKENS.type_leading_normal,
495500
},
496501
link: {
497502
fontColor: CORE_TOKENS.color_blue_800,

lib/src/image/Image.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,15 @@ const DxcImage = ({
3131
wrapper={(children: React.ReactNode) => (
3232
<Figure>
3333
{children}
34-
<BaseTypography as="figcaption" color={colorsTheme.image.captionFontColor} fontSize="0.875rem">
34+
<BaseTypography
35+
as="figcaption"
36+
color={colorsTheme.image.captionFontColor}
37+
fontFamily={colorsTheme.image.captionFontFamily}
38+
fontSize={colorsTheme.image.captionFontSize}
39+
fontStyle={colorsTheme.image.captionFontStyle}
40+
fontWeight={colorsTheme.image.captionFontWeight}
41+
lineHeight={colorsTheme.image.captionLineHeight}
42+
>
3543
{caption}
3644
</BaseTypography>
3745
</Figure>

0 commit comments

Comments
 (0)