From bf9e06e67d6012ddcb68f87acd5095173d631052 Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Tue, 5 Oct 2021 10:41:52 -0400 Subject: [PATCH] remove attr column --- docs/assets/plugins/metadata/metadata.js | 29 ++++++++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/docs/assets/plugins/metadata/metadata.js b/docs/assets/plugins/metadata/metadata.js index 55de06b3..c693281c 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 ? '' : '' }