Skip to content

Commit

Permalink
migrate
Browse files Browse the repository at this point in the history
  • Loading branch information
blidblid committed Aug 10, 2024
1 parent e4ddf74 commit 0be6575
Show file tree
Hide file tree
Showing 8 changed files with 2,740 additions and 3,510 deletions.
9 changes: 7 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,18 @@
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
]
],
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
"rules": {
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
{
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
Expand Down
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
/dist
/coverage

/.nx/cache
/.nx/cache
/.nx/workspace-data
10 changes: 5 additions & 5 deletions apps/demo/src/_app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
@use './lib/components/material-overrides';

@mixin theme($theme) {
$config: mat.get-color-config($theme);
$config: mat.m2-get-color-config($theme);
$primary-palette: map.get($config, 'primary');
$accent-palette: map.get($config, 'accent');
$background-palette: map.get($config, 'background');
$foreground-palette: map.get($config, 'foreground');

$primary-color: mat.get-color-from-palette($primary-palette);
$accent-color: mat.get-color-from-palette($accent-palette);
$divider-color: mat.get-color-from-palette($foreground-palette, divider);
$card-color: mat.get-color-from-palette($background-palette, card);
$primary-color: mat.m2-get-color-from-palette($primary-palette);
$accent-color: mat.m2-get-color-from-palette($accent-palette);
$divider-color: mat.m2-get-color-from-palette($foreground-palette, divider);
$card-color: mat.m2-get-color-from-palette($background-palette, card);

// make a new color map since @angular/material has a tedious API.
$colors: (
Expand Down
20 changes: 7 additions & 13 deletions apps/demo/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HttpClientModule } from '@angular/common/http';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
Expand All @@ -7,16 +7,10 @@ import { AppComponent } from './app.component';
import { DemoModule } from './demo';
import { HomeModule } from './home';

@NgModule({
declarations: [AppComponent],
imports: [
AppRoutingModule,
BrowserAnimationsModule,
BrowserModule,
DemoModule,
HomeModule,
HttpClientModule,
],
bootstrap: [AppComponent],
})
@NgModule({ declarations: [AppComponent],
bootstrap: [AppComponent], imports: [AppRoutingModule,
BrowserAnimationsModule,
BrowserModule,
DemoModule,
HomeModule], providers: [provideHttpClient(withInterceptorsFromDi())] })
export class AppModule {}
10 changes: 5 additions & 5 deletions apps/demo/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
@include layout.core();
@include mat.core();

$primary: mat.define-palette(mat.$blue-palette, A400);
$accent: mat.define-palette(mat.$orange-palette, A400);
$warn: mat.define-palette(mat.$red-palette);
$primary: mat.m2-define-palette(mat.$m2-blue-palette, A400);
$accent: mat.m2-define-palette(mat.$m2-orange-palette, A400);
$warn: mat.m2-define-palette(mat.$m2-red-palette);

$dark-theme: mat.define-dark-theme(
$dark-theme: mat.m2-define-dark-theme(
(
color: (
primary: $primary,
Expand All @@ -25,7 +25,7 @@ $dark-theme: mat.define-dark-theme(
)
);

$light-theme: mat.define-light-theme(
$light-theme: mat.m2-define-light-theme(
(
color: (
primary: $primary,
Expand Down
Loading

0 comments on commit 0be6575

Please sign in to comment.