mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-22 02:14:17 +00:00
MODULE-TYPO
- Sass set-up - md-list - md-theming (install)
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
/*
|
||||
* @ngdoc module
|
||||
* @name material.components.icon
|
||||
* @description
|
||||
* Icon
|
||||
*/
|
||||
angular.module('material.components.icon', [
|
||||
'material.core'
|
||||
])
|
||||
.directive('mdIcon', mdIconDirective);
|
||||
|
||||
/*
|
||||
* @ngdoc directive
|
||||
* @name mdIcon
|
||||
* @module material.components.icon
|
||||
*
|
||||
* @restrict E
|
||||
*
|
||||
* @description
|
||||
* The `<md-icon>` directive is an element useful for SVG icons
|
||||
*
|
||||
* @usage
|
||||
* <hljs lang="html">
|
||||
* <md-icon icon="/img/icons/ic_access_time_24px.svg">
|
||||
* </md-icon>
|
||||
* </hljs>
|
||||
*
|
||||
*/
|
||||
function mdIconDirective() {
|
||||
return {
|
||||
restrict: 'E',
|
||||
template: '<object class="md-icon"></object>',
|
||||
compile: function(element, attr) {
|
||||
var object = angular.element(element[0].children[0]);
|
||||
if(angular.isDefined(attr.icon)) {
|
||||
object.attr('data', attr.icon);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
})();
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
|
||||
md-icon {
|
||||
margin: auto;
|
||||
padding: 0;
|
||||
display: inline-block;
|
||||
margin-top: 5px;
|
||||
background-repeat: no-repeat no-repeat;
|
||||
pointer-events: none;
|
||||
}
|
||||
svg, object {
|
||||
fill: currentColor;
|
||||
color: currentColor;
|
||||
}
|
||||
|
||||
md-class-icon {
|
||||
// display: block;
|
||||
// margin: 0 auto;
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
describe('mdIcon directive', function() {
|
||||
});
|
||||
Reference in New Issue
Block a user