@@ -19,11 +19,12 @@ import type {
1919import { useComponentConfig } from '../hooks/useComponentConfig' ;
2020import { useTheme } from '../hooks/useTheme' ;
2121import { Icon } from '../icons/Icon' ;
22- import { Box , type BoxProps } from '../layout' ;
22+ import { Box , type BoxBaseProps , type BoxProps } from '../layout/Box ' ;
2323import { Text } from '../typography/Text' ;
2424
2525export type TagBaseProps = SharedProps &
26- SharedAccessibilityProps & {
26+ SharedAccessibilityProps &
27+ Omit < BoxBaseProps , 'children' | 'color' | 'background' > & {
2728 /** Children to render within the Tag. */
2829 children : React . ReactNode ;
2930 /**
@@ -84,7 +85,13 @@ export const Tag = memo(
8485 flexDirection = 'row' ,
8586 gap = 0.5 ,
8687 justifyContent = 'center' ,
88+ paddingX,
8789 paddingY = 0.25 ,
90+ font,
91+ fontFamily,
92+ fontSize,
93+ fontWeight,
94+ lineHeight,
8895 testID = 'cds-tag' ,
8996 ...props
9097 } = mergedProps ;
@@ -103,7 +110,7 @@ export const Tag = memo(
103110 flexDirection = { flexDirection }
104111 gap = { gap }
105112 justifyContent = { justifyContent }
106- paddingX = { tagHorizontalSpacing [ intent ] }
113+ paddingX = { paddingX ?? tagHorizontalSpacing [ intent ] }
107114 paddingY = { paddingY }
108115 testID = { testID }
109116 { ...props }
@@ -116,7 +123,11 @@ export const Tag = memo(
116123
117124 < Text
118125 dangerouslySetColor = { color }
119- font = { tagFontMap [ intent ] }
126+ font = { font ?? tagFontMap [ intent ] }
127+ fontFamily = { fontFamily }
128+ fontSize = { fontSize }
129+ fontWeight = { fontWeight }
130+ lineHeight = { lineHeight }
120131 numberOfLines = { 1 }
121132 testID = { `${ testID } --text` }
122133 >
0 commit comments