fix animation on block buttons

This commit is contained in:
Mads Rasmussen
2017-06-16 14:13:44 +02:00
parent efaa24fb51
commit 3ec9c9a348
3 changed files with 14 additions and 1 deletions

View File

@@ -78,6 +78,8 @@ Use this directive to render an umbraco button. The directive can be used to gen
function activate() {
scope.blockElement = false;
if (!scope.state) {
scope.state = "init";
}
@@ -95,10 +97,16 @@ Use this directive to render an umbraco button. The directive can be used to gen
angular.forEach(array, function(item){
scope.style = scope.style + " " + "btn-" + item;
if(item === "block") {
scope.blockElement = true;
}
});
} else {
scope.style = "btn-" + scope.buttonStyle;
if(scope.buttonStyle === "block") {
scope.blockElement = true;
}
}
}

View File

@@ -132,4 +132,9 @@
.umb-button--xl {
padding: 18px 52px;
font-size: 16px;
}
/* types */
.umb-button--block {
display: block;
width: 100%;
}

View File

@@ -1,4 +1,4 @@
<div class="umb-button">
<div class="umb-button" ng-class="{'umb-button--block': blockElement}">
<div class="icon-check umb-button__success" ng-class="{'-hidden': state !== 'success', '-white': style}"></div>