[components/reference] Show count of components if > 1

This commit is contained in:
Lea Verou
2024-12-02 16:08:17 -05:00
parent bd35c23784
commit 8b1fc9a18f

View File

@@ -23,9 +23,16 @@ table code {
<tr>
<th><code>{{ name }}{{ "()" if type == "method" }}</code></th>
<td>
{% if thingComponents.length > 1 %}
<details open>
<summary><strong>{{ thingComponents.length }}</strong> components</summary>
{% endif %}
{% for component in thingComponents %}
<a href="../{{ component.slug }}"><code>&lt;{{ component.tagName }}&gt;</code></a>
{%- endfor -%}
{% if thingComponents.length > 1 %}
</details>
{% endif %}
</td>
</tr>
{%- endfor %}