Skip to content

Commit

Permalink
Button tags should not use default link behaviour (#368)
Browse files Browse the repository at this point in the history
Fixes issue where `{{ partial:components/button as="button"  label="My button" }}` would inherit the default `href` attribute.
  • Loading branch information
mikemartin authored Dec 12, 2023
1 parent 6fca60f commit 06d369d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resources/views/snippets/_button_attributes.antlers.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
(link_type == 'tel') => 'href="tel:{{ tel }}"',
(link_type == 'sms') => 'href="sms:{{ sms }}"',
(link_type == 'asset') => 'href="{{ asset }}" download',
() => 'href="{{ url }}"'
(as !== 'button') => 'href="{{ url }}"'
)}}
{{ target_blank ?= 'rel="noopener" target="_blank"' }}
{{ attr_title ?= 'title="{{ attr_title }}"' }}
Expand Down

0 comments on commit 06d369d

Please sign in to comment.