add umb-badge component
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
function BadgeDirective() {
|
||||
|
||||
var directive = {
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
transclude: true,
|
||||
templateUrl: 'views/components/umb-badge.html',
|
||||
scope: {
|
||||
size: "@?",
|
||||
color: "@?"
|
||||
}
|
||||
};
|
||||
|
||||
return directive;
|
||||
|
||||
}
|
||||
|
||||
angular.module('umbraco.directives').directive('umbBadge', BadgeDirective);
|
||||
|
||||
})();
|
||||
@@ -120,6 +120,7 @@
|
||||
@import "components/umb-querybuilder.less";
|
||||
@import "components/umb-pagination.less";
|
||||
@import "components/umb-mini-list-view.less";
|
||||
@import "components/umb-badge.less";
|
||||
|
||||
@import "components/buttons/umb-button.less";
|
||||
@import "components/buttons/umb-button-group.less";
|
||||
|
||||
65
src/Umbraco.Web.UI.Client/src/less/components/umb-badge.less
Normal file
65
src/Umbraco.Web.UI.Client/src/less/components/umb-badge.less
Normal file
@@ -0,0 +1,65 @@
|
||||
.umb-badge {
|
||||
padding: 6px 8px;
|
||||
margin: 0 5px 0 0;
|
||||
font-weight: 600;
|
||||
color: @black;
|
||||
background-color: @turquoise-washed;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: @turquoise;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
// Colors
|
||||
.umb-badge--primary {
|
||||
background-color: @turquoise-washed;
|
||||
border-color: @turquoise;
|
||||
}
|
||||
|
||||
.umb-badge--seconday {
|
||||
background-color: @purple-washed;
|
||||
border-color: @purple;
|
||||
}
|
||||
|
||||
.umb-badge--danger {
|
||||
background-color: @red-washed;
|
||||
border-color: @red;
|
||||
}
|
||||
|
||||
.umb-badge--warning {
|
||||
background-color: @yellow-washed;
|
||||
border-color: @yellow;
|
||||
}
|
||||
|
||||
.umb-badge--success {
|
||||
background-color: @green-washed;
|
||||
border-color: @green;
|
||||
}
|
||||
|
||||
// Size
|
||||
.umb-badge--xs {
|
||||
font-size: 13px;
|
||||
padding: 1px 6px;
|
||||
}
|
||||
|
||||
.umb-badge--s {
|
||||
font-size: 14px;
|
||||
padding: 3px 6px;
|
||||
}
|
||||
|
||||
.umb-badge--m {
|
||||
font-size: 16px;
|
||||
padding: 6px 8px;
|
||||
}
|
||||
|
||||
.umb-badge--l {
|
||||
font-size: 18px;
|
||||
padding: 6px 8px;
|
||||
}
|
||||
|
||||
.umb-badge--xl {
|
||||
font-size: 20px;
|
||||
padding: 6px 8px;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<span class="umb-badge umb-badge--{{color}} umb-badge--{{size}}" ng-transclude></span>
|
||||
Reference in New Issue
Block a user