Skip to content

Commit

Permalink
docs(material/theming): add missing theme variable to theming guide d…
Browse files Browse the repository at this point in the history
…ocs (angular#27324)
  • Loading branch information
SaishNarvekar authored Jun 18, 2023
1 parent 0416617 commit e7d9249
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions guides/theming-your-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ indicating whether dark mode is set.
@use 'sass:map';
@use '@angular/material' as mat;

$primary: mat.define-palette(mat.$indigo-palette);
$accent: mat.define-palette(mat.$pink-palette);
$warn: mat.define-palette(mat.$red-palette);

$theme: mat.define-light-theme((
color: (primary: $primary, accent: $accent, warn: $warn),
));

$color-config: mat.get-color-config($theme);
$primary-palette: map.get($color-config, 'primary');
$accent-palette: map.get($color-config, 'accent');
Expand Down

0 comments on commit e7d9249

Please sign in to comment.