Attach different CSS classes to first and second link I have a Paragraph type 'Call to action' with one link field field_link.

I have another Paragraph type where I call the 'Call to action' paragraph as an Entity reference revisions field. With Allowed number of values set to 2.

So the editor is able to insert two Call to action links.

I want to attach 2 specific CSS classes to both links:

On the first link:

&lt;a href="" class="button-one"&gt;Button one&lt;/a&gt;


On the second link:

&lt;a href="" class="button-two"&gt;Button two&lt;/a&gt;


How do I loop through, so I am able to attach different classes?

Update:

In paragraph--call-to-action.html.twig I added:

{% block paragraph %}

{% for item in content.field_link %}
    {% if loop.index == 1 %}
      Button one
    {% elseif loop.index == 2 %}
      Button two
    {% endif %}
  {% endfor %}

{% endblock paragraph %}

But now it's rendering always the 2 buttons? What's wrong here?
I figured how to loop through an entity reference field. Because I am looping from inside a paragraph twig through another paragraph (entity reference) I have to loop the children:

{% for item in content.field_name|children %}


So the children did the trick! Then you can do something like:

{% set link_class = loop.index == 1 ? 'primary' : 'secondary' %}