This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(icon): add support for themes with md-primary, etc.
- Loading branch information
1 parent
a410421
commit cdea9a2
Showing
3 changed files
with
32 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,26 @@ | ||
|
||
angular.module('appDemoFontIcons', ['ngMaterial']) | ||
.controller('DemoCtrl', function( $scope ) { | ||
// Create list of font-icon names with color overrides | ||
var iconData = [ | ||
{name: 'icon-home' , color: "#777" }, | ||
{name: 'icon-user-plus' , color: "rgb(89, 226, 168)" }, | ||
{name: 'icon-google-plus2', color: "#A00" }, | ||
{name: 'icon-youtube4' , color:"#00A" }, | ||
{name: 'icon-settings' , color:"black" } | ||
]; | ||
angular | ||
.module('appDemoFontIcons', ['ngMaterial']) | ||
.controller('DemoCtrl', function( $scope ) { | ||
// Create list of font-icon names with color overrides | ||
var iconData = [ | ||
{name: 'icon-home' , color: "#777" }, | ||
{name: 'icon-user-plus' , color: "rgb(89, 226, 168)" }, | ||
{name: 'icon-google-plus2', color: "#A00" }, | ||
{name: 'icon-youtube4' , color:"#00A" }, | ||
// Use theming to color the font-icon | ||
{name: 'icon-settings' , color:"#A00", theme:"md-warn md-hue-5"} | ||
]; | ||
|
||
// Create a set of sizes... | ||
$scope.sizes = [12, 21, 36, 48]; | ||
$scope.fonts = [].concat(iconData); | ||
// Create a set of sizes... | ||
$scope.sizes = [12, 21, 36, 48]; | ||
$scope.fonts = [].concat(iconData); | ||
|
||
}); | ||
}) | ||
.config(function($mdThemingProvider){ | ||
// Update the theme colors to use themes on font-icons | ||
$mdThemingProvider.theme('default') | ||
.primaryPalette("red") | ||
.accentPalette('green') | ||
.warnPalette('blue'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters