remove attr column

pull/560/head
Cory LaViska 2021-10-05 10:41:52 -04:00
rodzic 1e03d222c5
commit bf9e06e67d
1 zmienionych plików z 24 dodań i 5 usunięć

Wyświetl plik

@ -11,7 +11,6 @@
<thead>
<tr>
<th>Name</th>
<th>Attribute</th>
<th>Description</th>
<th>Reflects</th>
<th>Type</th>
@ -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>