MDL-62191 output: New extra attributes for single_button

Useful for data- attributes.
This commit is contained in:
David Monllaó 2019-09-03 15:30:06 +08:00
parent 9528b1ff5b
commit ca81e906e0
4 changed files with 36 additions and 3 deletions

View file

@ -42,7 +42,13 @@
"url" : "#",
"primary" : true,
"tooltip" : "This is a tooltip",
"label" : "This is a the button text"
"label" : "This is a the button text",
"attributes": [
{
"name": "data-attribute",
"value": "yeah"
}
]
}
}}
<div class="{{classes}}">
@ -53,7 +59,8 @@
<button type="submit" class="btn {{#primary}}btn-primary{{/primary}}{{^primary}}btn-secondary{{/primary}}"
id="{{id}}"
title={{#quote}}{{tooltip}}{{/quote}}
{{#disabled}}disabled{{/disabled}}>{{label}}</button>
{{#disabled}}disabled{{/disabled}}
{{#attributes}} {{name}}={{#quote}}{{value}}{{/quote}} {{/attributes}}>{{label}}</button>
</form>
</div>
{{#hasactions}}