Skip to content

Commit fa3dffe

Browse files
committed
refactor(offcanvas): use ThemeDirective composition for dark prop
1 parent e80d399 commit fa3dffe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

projects/coreui-angular/src/lib/offcanvas/offcanvas/offcanvas.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import { Subscription } from 'rxjs';
2424
import { filter } from 'rxjs/operators';
2525

2626
import { BackdropService } from '../../backdrop/backdrop.service';
27+
import { ThemeDirective } from '../../shared';
2728
import { OffcanvasService } from '../offcanvas.service';
2829

2930
let nextId = 0;
@@ -52,6 +53,9 @@ let nextId = 0;
5253
exportAs: 'cOffcanvas',
5354
standalone: true,
5455
imports: [A11yModule],
56+
hostDirectives: [
57+
{ directive: ThemeDirective, inputs: ['dark'] }
58+
],
5559
// eslint-disable-next-line @angular-eslint/no-host-metadata-property
5660
host: { ngSkipHydration: 'true' }
5761
})

0 commit comments

Comments
 (0)