In my app I have a light theme and a dark theme. I'm trying to style a custom component, so that a color will depend on whether it's a dark theme or light theme. This is my code in the custom component scss:
@import '~@angular/material/theming';
@mixin app-toolbar-theme($theme) {
$accent: map-get($theme, accent);
$primary: map-get($theme, primary);
$warn: map-get($theme, warn);
.mat-toolbar {
background: //if dark theme 'red', if light theme 'blue'
}
}
Is there a way to change the background of the toolbar based on whether I'm in a dark or light theme?