Skip to content

Commit

Permalink
Allow to add attributes to buttons
Browse files Browse the repository at this point in the history
This would be useful if we are adding attributes that help us to integrate the HTML with some WYSIWYG (as Mailchimp with mc:edit). Most of the existing components already include the attributes, but not the button.
  • Loading branch information
yvmarques authored Jul 5, 2016
1 parent 835c6e3 commit 11805b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/componentFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports = function(element) {

// If we have the href attribute we can create an anchor for the inner of the button;
if (element.attr('href')) {
inner = format('<a href="%s"%s>%s</a>', element.attr('href'), target, inner);
inner = format('<a %s href="%s"%s>%s</a>', attrs, element.attr('href'), target, inner);
}

// If the button is expanded, it needs a <center> tag around the content
Expand Down

0 comments on commit 11805b4

Please sign in to comment.