Skip to content

Commit

Permalink
remove attr column
Browse files Browse the repository at this point in the history
  • Loading branch information
claviska committed Oct 5, 2021
1 parent 1e03d22 commit bf9e06e
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions docs/assets/plugins/metadata/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<thead>
<tr>
<th>Name</th>
<th>Attribute</th>
<th>Description</th>
<th>Reflects</th>
<th>Type</th>
Expand All @@ -21,13 +20,33 @@
<tbody>
${props
.map(prop => {
const hasAttribute = !!prop.attribute;
const isAttributeDifferent = prop.attribute !== prop.name;
let attributeInfo = '';
if (!hasAttribute) {
attributeInfo = `<br><small>(property only)</small>`;
} else if (isAttributeDifferent) {
attributeInfo = `
<br>
<sl-tooltip content="This attribute is different than the property">
<small>
<code class="nowrap">
${escapeHtml(prop.attribute)}
</code>
</small>
</sl-tooltip>`;
}
return `
<tr>
<td class="nowrap">
<code>${escapeHtml(prop.name)}</code>
<td>
<code class="nowrap">${escapeHtml(prop.name)}</code>
${attributeInfo}
</td>
<td>
${escapeHtml(prop.description)}
</td>
<td class="nowrap">${prop.attribute ? `<code>${escapeHtml(prop.attribute)}</code>` : '-'}</td>
<td>${escapeHtml(prop.description)}</td>
<td style="text-align: center;">${
prop.reflects ? '<sl-icon label="yes" name="check"></sl-icon>' : ''
}</td>
Expand Down

0 comments on commit bf9e06e

Please sign in to comment.