create-custom-theme.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. "use strict";
  2. /**
  3. * @license
  4. * Copyright Google LLC All Rights Reserved.
  5. *
  6. * Use of this source code is governed by an MIT-style license that can be
  7. * found in the LICENSE file at https://angular.io/license
  8. */
  9. Object.defineProperty(exports, "__esModule", { value: true });
  10. /** Create custom theme for the given application configuration. */
  11. function createCustomTheme(name = 'app') {
  12. return `
  13. // Custom Theming for Angular Material
  14. // For more information: https://material.angular.io/guide/theming
  15. @import '~@angular/material/theming';
  16. // Plus imports for other components in your app.
  17. // Include the common styles for Angular Material. We include this here so that you only
  18. // have to load a single css file for Angular Material in your app.
  19. // Be sure that you only ever include this mixin once!
  20. @include mat-core();
  21. // Define the palettes for your theme using the Material Design palettes available in palette.scss
  22. // (imported above). For each palette, you can optionally specify a default, lighter, and darker
  23. // hue. Available color palettes: https://material.io/design/color/
  24. $${name}-primary: mat-palette($mat-indigo);
  25. $${name}-accent: mat-palette($mat-pink, A200, A100, A400);
  26. // The warn palette is optional (defaults to red).
  27. $${name}-warn: mat-palette($mat-red);
  28. // Create the theme object (a Sass map containing all of the palettes).
  29. $${name}-theme: mat-light-theme($${name}-primary, $${name}-accent, $${name}-warn);
  30. // Include theme styles for core and each component used in your app.
  31. // Alternatively, you can import and @include the theme mixins for each component
  32. // that you are using.
  33. @include angular-material-theme($${name}-theme);
  34. `;
  35. }
  36. exports.createCustomTheme = createCustomTheme;
  37. //# sourceMappingURL=create-custom-theme.js.map