(css) Respect theme in sg-toggle-grid

Fixes #4500
pull/229/merge
Francis Lachapelle 2018-07-09 10:59:58 -04:00
parent d8b91bf08e
commit d6f85efa8a
2 changed files with 6 additions and 9 deletions

View File

@ -24,6 +24,7 @@
};
function compile(tElement, tAttrs) {
var CLASS_ACTIVE = 'md-default-theme md-accent md-bg md-bdr';
return function postLink(scope, element, attr, controllers) {
var tiles = tElement.find('md-grid-tile'),
tile,
@ -43,7 +44,7 @@
// Toggle class on click event and call toggle function
var tile = angular.element(this),
day = tile.attr('value');
tile.toggleClass('sg-active');
tile.toggleClass(CLASS_ACTIVE);
toggle(day);
};
@ -64,7 +65,7 @@
_.forEach(tiles, function(o) {
var tile = angular.element(o);
if (_.includes(flattenedDays, tile.attr('value'))) {
tile.addClass('sg-active');
tile.addClass(CLASS_ACTIVE);
}
});
ngModelCtrl.$validate();

View File

@ -8,15 +8,11 @@ $sg-grid-border-width-focused: 2px;
&.sg-icon-button {
@extend .md-button;
// Overwrite some styles of .md-button
border: 1px solid sg-color($sogoBlue, 300);
border-radius: 5%;
color: sg-color($sogoBlue, 600);
border: 1px solid $colorGrey600;
border-radius: 2px;
color: $colorGrey700;
min-height: auto;
position: absolute;
}
&.sg-active {
background-color: sg-color($sogoBlue, 300);
color: #fff;
}
}
}