Skip to content

Commit 642fcf1

Browse files
committed
More actions tweaks
1 parent cf56a6d commit 642fcf1

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

templates/partials/actions.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{#
22
@param links array of objects with the following properties:
33
- type: string (primary or secondary)
4+
- style: string (accent-primary, accent-secondary or outline: this is an alternative to the type property)
45
- link: object with the following properties:
56
- url: string
67
- title: string
78
@param class string
89
#}
9-
1010
{% if links %}
1111
<div class="actions {{ class ? class : null }}">
1212
{% for cta in links %}

templates/partials/basic-section/content-text.twig

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
<h3>{{ section.heading }}</h3>
33
<p>{{ section.content }}</p>
44
{% if section.links %}
5-
<div class="actions">
6-
{% for cta in section.links %}
7-
<a class="button -{{ cta.style }}" href="{{ cta.link.url }}">{{ cta.link.title }}</a>
8-
{% endfor %}
9-
</div>
5+
{% include 'partials/actions.twig' with { links: section.links, class: 'basicSection__actions' } %}
106
{% endif %}
117
</div>

0 commit comments

Comments
 (0)