<a href="#" class="c-action c-action--small c-action--text-inverted" data-notation="underline-cta-cyan">Action text</a>
{% if version is defined %}
  {% set versions = {
    "highlight": {
      modifier: "c-action--highlight",
      notation: "circle-cyan",
      ariaLabel: null
    },
    "accent": {
      modifier: "c-action--accent",
      notation: "circle-accent",
      ariaLabel: null
    },
    "text": {
      modifier: "c-action--text",
      notation: "underline-cta-accent",
      ariaLabel: null
    },
    "text-inverted": {
      modifier: "c-action--text-inverted",
      notation: "underline-cta-cyan",
      ariaLabel: null
    },
    "text-small": {
      modifier: "c-action--small c-action--text",
      notation: "underline-cta-accent",
      ariaLabel: null
    },
    "text-inverted-small": {
      modifier: "c-action--small c-action--text-inverted",
      notation: "underline-cta-cyan",
      ariaLabel: null
    },
    "brick": {
      modifier: "c-action--brick",
      notation: null,
      ariaLabel: null
    },
    "nude": {
      modifier: "c-action--nude",
      notation: null,
      ariaLabel: null
    }
  } %}
  {% set currentVersion = versions[version] %}
  {% set notation = (currentVersion.notation ~ ' ' ~ ( notation | default(''))) | trim %}
  {% set modifier = (currentVersion.modifier  ~ ' ' ~ ( modifier | default(''))) | trim %}
  {% set ariaLabel = (currentVersion.ariaLabel  ~ ' ' ~ ( ariaLabel | default(null))) | trim %}
{% endif %}

<a 
  href="{{ url }}" 
  class="c-action{% if modifier is defined %} {{ modifier }}{% endif %}"
  {% if notation %} data-notation="{{ notation }}"{% endif %}
  {# TODO: usiamo text nell'aria label perchè siteimprove si arrabbia diversamente #}
  {% if ariaLabel %} aria-label="{{ ariaLabel != text ? text : ariaLabel }}"{% endif %}
  >
  {{- text -}}
</a>
{
  "text": "Action text",
  "url": "#",
  "version": "text-inverted-small"
}
  • Handle: @link--text-inverted-small
  • Preview:
  • Filesystem Path: src/pattern-library/02-components/action/link/link.twig

No notes defined.