app/components/optics/button/component.rb in optics_view_components-0.1.3 vs app/components/optics/button/component.rb in optics_view_components-0.1.4

- old
+ new

@@ -25,22 +25,23 @@ end end end def build_button(&) - return link_to(url, class: classes, **@attributes, &) if url + return link_to(url, class: classes, **@attributes.except(:class), &) if url - tag.button(class: classes, **@attributes, &) + tag.button(class: classes, **@attributes.except(:class), &) end def button_class return 'btn' if variant == 'default' "btn-#{variant}" end def classes class_names( + @attributes[:class], button_class, size_class, 'btn--icon': icon, 'btn--no-border': !border ).join(' ')