Skip to content
Snippets Groups Projects
Commit da965965 authored by Rajab Natshah's avatar Rajab Natshah
Browse files

Issue #3357698: Fixed the Rich text block and heading SDC components

parent 9124bccd
No related branches found
No related tags found
No related merge requests found
......@@ -16,4 +16,7 @@ props:
- h3
- h4
- h5
- h6
\ No newline at end of file
- h6
attributes:
type: Drupal\Core\Template\Attribute
name: Attributes
\ No newline at end of file
......@@ -4,16 +4,14 @@
* Template for a heading component.
*
* Available config:
* - tag : h1 | h2 | h3 | h4 | h5 | h6
* - html_tag : h1 | h2 | h3 | h4 | h5 | h6
* - content: string
* - attributes: Attributes array.
* - utility_classes: An array of utility classes.
*/
#}
{% set html_tag = tag ?? 'h1' %}
{% set html_tag = html_tag ?? 'h1' %}
{% set utility_classes = utility_classes ?? [] %}
{% if html_tag %}
<{{ html_tag }} {{ attributes.addClass(utility_classes|join(' ')) }}>{{ content }}</{{ html_tag }}>
{% endif %}
<{{ html_tag }} {{ attributes.addClass(utility_classes|join(' ')) }}>{{ content }}</{{ html_tag }}>
......@@ -15,7 +15,7 @@
{% if heading %}
{% include "varbase_components:heading" with {
attributes: heading_attributes,
title_tag: title_tag,
html_tag: 'h2',
content: heading,
utility_classes: ['rich-heading', 'mb-2']
} %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment