Link: external component

Marks links to external websites with a class and causes them to open in a new tab.

id: link.external
title: 'Link: external'
description: 'Marks links to external websites with a class and causes them to open in a new tab.'
class: Drupal\ambientimpact_ux\Plugin\AmbientImpact\Component\LinkExternal
provider: ambientimpact_ux
externalClass: external-link
attributes:
  class:
    - external-link
  target:
    - _blank
  rel:
    - noopener
    - noreferrer
component.link.external:
  js:
    components/link.external/link.external.js:
      attributes:
        defer: true
  dependencies:
    - ambientimpact_core/framework