lib/ccs/components/govuk/cookie_banner/action.rb in ccs-frontend_helpers-0.1.2 vs lib/ccs/components/govuk/cookie_banner/action.rb in ccs-frontend_helpers-0.2.0
- old
+ new
@@ -44,9 +44,10 @@
def render
if href && options[:attributes][:type] != :button
link_to(text, href, **options[:attributes])
else
+ options[:attributes][:type] ||= :button
Button.new(text: text, href: href, context: context, **options).render
end
end
# The default attributes for the cookie banner action