{% comment %}
  Renders a heading component

  Accepts:
  - icon: {string} Icon of the section (optinal)
  - subtitle: {string} Subtitle of the section (optinal)
  - title: {string} Title of the section (optinal)

  Usage:
  {% render 'heading',
  %}
{% endcomment %}

{% if section.settings.title != blank %}
  <div
    class='heading'
  >
    {%- if section.settings.icon -%}
      <div class='heading__icon'>
        {%- render 'image', image: section.settings.icon -%}
      </div>
    {%- endif -%}
    <h2 class='heading__title'>
      {{ section.settings.title }}
    </h2>

    {% if section.settings.subtitle != blank %}
      <div class='heading__subtitle'>
        {{ section.settings.subtitle }}
      </div>
    {% endif %}
  </div>
{% endif %}
