{% load wagtailadmin_tags %}
<div class="w-panel__wrapper {{ child.classes|join:' ' }}">
    {% if child.heading %}
        {% fragment as label_content %}
            {{ child.heading }}{% if child.is_required %}<span class="w-required-mark">*</span>{% endif %}
        {% endfragment %}
        {% if child.id_for_label %}
            <label class="w-field__label" for="{{ child.id_for_label }}" id="{{ child.id_for_label }}-label">{{ label_content }}</label>
        {% else %}
            <h3 class="w-field__label">{{ label_content }}</h3>
        {% endif %}
    {% endif %}

    {% component child %}
</div>
