{# DOCS #}
{#
  description
    - type
    - text
    - backgroundColour
    - textColour
    - isHeading
#}
{{ attach_library('ui_patterns/jc_dropdown.jc_base') }}
{{ attach_library('ui_patterns/jc_modal.jc_modal_lib') }}

{% if description.text %}

  <div class="description">

    {% if description.isHeading %}
      <h3 class="description-header">{{ description.text|raw }}</h3>
    {% else %}
      <div class="description-content"
         {% if description.backgroundColour or description.textColour %}
          style="
           {% if description.backgroundColour %}
             background-color: #{{ description.backgroundColour }};
             padding: 1rem;
           {% endif %}
           {% if description.textColour %}
             color: #{{ description.textColour }};
           {% endif %}
           "
         {% endif %}
        >
        {{ description.text|jc_header_level(3)|raw }}
      </div>
    {% endif %}

  </div>

{% endif %}
