Skip to content

Commit

Permalink
fix(theming): fix global core import (#1103)
Browse files Browse the repository at this point in the history
* fix(theming): fix global core import

* fix(demo): fix demo app tooltip options
  • Loading branch information
PhilippeLafreniere18 committed Sep 22, 2022
1 parent 5d7533a commit 88b0b96
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
2 changes: 2 additions & 0 deletions demo/src/app/app.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ mat-sidenav {
mat-sidenav-content {
padding: 10px;
}

:ng-deep .mat-tooltip-hide { display: none!important; } // temporary fix (https://github.com/angular/components/issues/24614)
9 changes: 9 additions & 0 deletions demo/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ import { AppContextModule } from './context/context/context.module';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { IgoCoreModule, LanguageService } from '@igo2/core';
import { MatTooltipDefaultOptions, MAT_TOOLTIP_DEFAULT_OPTIONS } from '@angular/material/tooltip';

export const defaultTooltipOptions: MatTooltipDefaultOptions = {
showDelay: 500,
hideDelay: 0,
touchendHideDelay: 0,
disableTooltipInteractivity: true
};

@NgModule({
declarations: [AppComponent],
Expand Down Expand Up @@ -111,6 +119,7 @@ import { IgoCoreModule, LanguageService } from '@igo2/core';
],
providers: [
{provide: APP_INITIALIZER, useFactory: appInitializerFactory, deps: [LanguageService], multi: true},
{ provide: MAT_TOOLTIP_DEFAULT_OPTIONS, useValue: defaultTooltipOptions }
],
bootstrap: [AppComponent]
})
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ gulp.task('core:concatStyles', done => {
gulp
.src([
'./packages/core/src/style/setup.scss',
'./packages/core/src/style/all.theming.scss',
'./packages/core/src/style/typography.scss',
'./packages/core/src/style/all.theming.scss',
'./packages/core/src/style/foreground.scss',
'./packages/core/src/style/theming.scss',
'./packages/core/src/style/core.theming.scss',
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/style/theming.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@import './material.font';

@mixin igo-theming($theme, $typography) {
@include mat.core($typography);

@include igo-core-theming($theme, $typography);
}
2 changes: 2 additions & 0 deletions packages/core/src/style/typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ $igo-typography: mat.define-typography-config(
$button: mat.define-typography-level(13px, 13px, 500),
$input: mat.define-typography-level(14px, 1.25, 400)
);

@include mat.core($igo-typography);

0 comments on commit 88b0b96

Please sign in to comment.