add option to show a caret in a umb-button

This commit is contained in:
Mads Rasmussen
2018-11-19 12:42:27 +01:00
parent e84cbc7e19
commit 24913128d1
3 changed files with 11 additions and 1 deletions

View File

@@ -66,6 +66,7 @@ Use this directive to render an umbraco button. The directive can be used to gen
@param {string=} size Set a button icon ("xs", "m", "l", "xl").
@param {boolean=} disabled Set to <code>true</code> to disable the button.
@param {string=} addEllipsis Adds an ellipsis character (…) to the button label which means the button will open a dialog or prompt the user for more information.
@param {string=} showCaret Shows a caret on the right side of the button label
**/
@@ -93,7 +94,8 @@ Use this directive to render an umbraco button. The directive can be used to gen
disabled: "<?",
size: "@?",
alias: "@?",
addEllipsis: "@?"
addEllipsis: "@?",
showCaret: "@?"
}
});

View File

@@ -29,6 +29,11 @@
opacity: 0;
}
.umb-button .umb-button__caret {
margin-top: 0;
margin-left: 3px;
}
.umb-button__progress {
position: absolute;
left: 50%;

View File

@@ -11,6 +11,7 @@
<span class="umb-button__content" ng-class="{'-hidden': vm.innerState !== 'init'}">
<i ng-if="vm.icon" class="{{vm.icon}} umb-button__icon"></i>
{{vm.buttonLabel}}
<span ng-if="vm.showCaret" class="umb-button__caret caret"></span>
</span>
</a>
@@ -18,6 +19,7 @@
<span class="umb-button__content" ng-class="{'-hidden': vm.innerState !== 'init'}">
<i ng-if="vm.icon" class="{{vm.icon}} umb-button__icon"></i>
{{vm.buttonLabel}}
<span ng-if="vm.showCaret" class="umb-button__caret caret"></span>
</span>
</button>
@@ -25,6 +27,7 @@
<span class="umb-button__content" ng-class="{'-hidden': vm.innerState !== 'init'}">
<i ng-if="vm.icon" class="{{vm.icon}} umb-button__icon"></i>
{{vm.buttonLabel}}
<span ng-if="vm.showCaret" class="umb-button__caret caret"></span>
</span>
</button>