fix animation on block buttons
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -132,4 +132,9 @@
|
||||
.umb-button--xl {
|
||||
padding: 18px 52px;
|
||||
font-size: 16px;
|
||||
}
|
||||
/* types */
|
||||
.umb-button--block {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user