{{ attach_library('gesso/back_to_top') }}

{% set classes = [
  'c-back-to-top',
  modifier_classes ? modifier_classes : '',
]|join(' ')|trim %}

<a href="#{{ top_element }}" {{ add_attributes({ 'class': classes }) }} title="{{ text }}" aria-hidden="true" tabindex="-1">
  {% include '@components/icon/icon.twig' with {
    'is_hidden': false,
    'label': text,
    'modifier_classes': 'c-icon--back-to-top',
    'icon_name': 'angle',
  } %}
</a>
