dsfr4drupal-1.x-dev/components/highlight/highlight.twig
components/highlight/highlight.twig
{% set attributes = attributes|default(create_attribute()) %}
{% set content_attributes = content_attributes|default(create_attribute()) %}
{% if variant and variant != 'md' %}
{% set content_attributes = content_attributes.addClass('fr-text--' ~ variant) %}
{% endif %}
{% if color_schema %}
{% set attributes = attributes.addClass('fr-highlight--' ~ color_schema) %}
{% endif %}
<div{{ attributes.addClass('fr-highlight') }}>
<p{{ content_attributes }}>{{ content }}</p>
</div>
