File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -919,13 +919,19 @@ export function StyleMacroProperties({properties}: StyleMacroPropertiesProps) {
919919 { propDef . additionalTypes && propDef . additionalTypes . map ( ( typeName , i ) => {
920920 let typeLink = styleMacroValueDesc [ typeName ] ;
921921 if ( typeLink ?. description || typeLink ?. body ) {
922+ // dont render the type name for properties that only have one special value (e.g. baseSpacing) that has an associated description
923+ // so that we don't double up on rendering the value name
924+ let shouldSkipTypeName = values . length === 0 && propDef . additionalTypes ?. length === 1 ;
925+
922926 return (
923927 < div key = { `type-desc-${ i } ` } >
924- < h4 className = { style ( { font : 'ui' , fontWeight : 'bold' , marginBottom : 8 } ) } >
925- < code className = { codeStyle } >
926- < span className = { codeStyles . variable } > { typeName } </ span >
927- </ code >
928- </ h4 >
928+ { ! shouldSkipTypeName && (
929+ < h4 className = { style ( { font : 'ui' , fontWeight : 'bold' , marginBottom : 8 } ) } >
930+ < code className = { codeStyle } >
931+ < span className = { codeStyles . variable } > { typeName } </ span >
932+ </ code >
933+ </ h4 >
934+ ) }
929935 { typeLink . description && (
930936 < p className = { style ( { font : 'body' , marginBottom : 8 } ) } >
931937 { typeLink . description }
You can’t perform that action at this time.
0 commit comments