Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nav drawer - fixing navdrawer item in material theme to work with ripple directive #14574

Merged
merged 3 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -384,13 +384,18 @@
}

@if $variant == 'material' {
$reduce-size: rem(8px);

// The clip path here fixes a bug: https://github.com/IgniteUI/igniteui-angular/issues/14554
clip-path: inset(calc($reduce-size / 2) 0 round var-get($theme, 'item-border-radius'));

&::after {
content: '';
position: absolute;
width: 100%;
inset-block-start: rem(4px);
inset-inline-start: 0;
height: calc(100% - #{rem(8px)});
height: calc(100% - #{$reduce-size});
border-radius: var-get($theme, 'item-border-radius');
z-index: -1;
}
Expand Down
29 changes: 15 additions & 14 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, OnInit, ViewChild, HostBinding } from '@angular/core';
import { Router, NavigationStart, NavigationEnd, RouterLinkActive, RouterLink, RouterOutlet } from '@angular/router';
import { filter } from 'rxjs/operators';
import { IgxNavigationDrawerComponent, IgxIconService } from 'igniteui-angular';
import { IgxNavigationDrawerComponent, IgxIconService, IgxRippleDirective } from 'igniteui-angular';
import { PageHeaderComponent } from './pageHeading/pageHeading.component';
import { IgxIconComponent } from '../../projects/igniteui-angular/src/lib/icon/icon.component';
import { NgFor, NgIf } from '@angular/common';
Expand All @@ -12,19 +12,20 @@ import { IgxNavDrawerTemplateDirective, IgxNavDrawerItemDirective, IgxNavDrawerM
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
standalone: true,
imports: [
IgxNavigationDrawerComponent,
IgxNavDrawerTemplateDirective,
IgxNavDrawerItemDirective,
NgFor,
RouterLinkActive,
RouterLink,
IgxIconComponent,
NgIf,
IgxNavDrawerMiniTemplateDirective,
PageHeaderComponent,
RouterOutlet
]
imports: [
IgxNavigationDrawerComponent,
IgxNavDrawerTemplateDirective,
IgxNavDrawerItemDirective,
NgFor,
RouterLinkActive,
RouterLink,
IgxIconComponent,
NgIf,
IgxNavDrawerMiniTemplateDirective,
PageHeaderComponent,
RouterOutlet,
IgxRippleDirective,
],
})
export class AppComponent implements OnInit {
@HostBinding('attr.id')
Expand Down
Loading