- Create a new file for theming the component at the same level as the component itself. Call it "{{componentName}}.scss-theme.scss" (From now on called the theme file)
- Inside the theme file import material theming utils with
@use '~@angular/material/theming' as material;
- Then create a mixing with the name of the component and make it receive a parameter of $theme in order to provide for the theme.
@mixin app-banner-theme($theme) {...}
. - Inside that mixing, add all the neccesary styling for the component. You can access the theme colors like this:
$theme-colors: material.mat-get-color-config($theme);
$success-color: map-get($theme-colors, success);