diff --git a/docs/assets/plugins/metadata/metadata.js b/docs/assets/plugins/metadata/metadata.js index 55de06b33..c693281c6 100644 --- a/docs/assets/plugins/metadata/metadata.js +++ b/docs/assets/plugins/metadata/metadata.js @@ -11,7 +11,6 @@ Name - Attribute Description Reflects Type @@ -21,13 +20,33 @@ ${props .map(prop => { + const hasAttribute = !!prop.attribute; + const isAttributeDifferent = prop.attribute !== prop.name; + let attributeInfo = ''; + + if (!hasAttribute) { + attributeInfo = `
(property only)`; + } else if (isAttributeDifferent) { + attributeInfo = ` +
+ + + + ${escapeHtml(prop.attribute)} + + + `; + } + return ` - - ${escapeHtml(prop.name)} + + ${escapeHtml(prop.name)} + ${attributeInfo} + + + ${escapeHtml(prop.description)} - ${prop.attribute ? `${escapeHtml(prop.attribute)}` : '-'} - ${escapeHtml(prop.description)} ${ prop.reflects ? '' : '' }