-
Notifications
You must be signed in to change notification settings - Fork 0
/
modal-buttons.html
57 lines (57 loc) · 2.5 KB
/
modal-buttons.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{% if page.buttons or layout.buttons %}
<div
class="
modal-panel-footer
modal-panel-main-button-bar
pat-button-bar
pat-bumper">
{% for button in page.buttons %}
{% assign this_button = button.label %}
{% if button.type == 'submit' or button.type == 'button' %}
<button
class="
pat-button
{{ button.class }}
{% if button.switch %}pat-switch{% endif %}"
{% if button.switch %}data-pat-switch="{{ button.switch }}"{% endif %}
type="{{ button.type }}" {% if button.path %}formaction="{{ button.path }}"{% endif %}>
{%- include patterns/i18n id=this_button -%}</button>
{% endif %}
{% if button.type == 'link' %}
<a
href="{{ button.path }}"
class="
pat-button
{{ button.class }}
{% if button.inject %}pat-inject{% endif %}"
{% if button.target %}target="{{ button.target }}{% endif %}"
{% if button.inject %}data-pat-inject="{{ button.inject }}"{% endif %}>{%- include patterns/i18n id=this_button -%}</a>
{% endif %}
{% endfor %}
{% for button in layout.buttons %}
{% assign this_button = button.label %}
{% if button.type == 'submit' or button.type == 'button' %}
<button
class="
pat-button
{{ button.class }}"
type="{{ button.type }}"
{% if button.path %}formaction="{{ button.path }}"{% endif %}>
{%- include patterns/i18n id=this_button -%}
</button>
{% endif %}
{% if button.type == 'link' %}
<a
href="{{ button.path }}"
class="
pat-button
{{ button.class }}
{% if button.inject %}pat-inject{% endif %}"
{% if button.target %}target="{{ button.target }}{% endif %}"
{% if button.inject %}data-pat-inject="{{ button.inject }}"{% endif %}>
{%- include patterns/i18n id=this_button -%}
</a>
{% endif %}
{% endfor %}
</div>
{% endif %}