@@ -4,6 +4,7 @@ import { BreakpointObserver } from '@angular/cdk/layout';
44
55import { CollapseDirective } from '../collapse' ;
66import { Colors } from '../coreui.types' ;
7+ import { ThemeDirective } from '../shared' ;
78
89// todo: fix container prop issue not rendering children
910// todo: workaround - use <c-container> component directly in template
@@ -12,18 +13,17 @@ import { Colors } from '../coreui.types';
1213 selector : 'c-navbar' ,
1314 templateUrl : './navbar.component.html' ,
1415 standalone : true ,
15- imports : [ NgClass , NgTemplateOutlet ]
16+ imports : [ NgClass , NgTemplateOutlet ] ,
17+ hostDirectives : [
18+ { directive : ThemeDirective , inputs : [ 'colorScheme' ] }
19+ ]
1620} )
1721export class NavbarComponent implements AfterContentInit {
1822 /**
1923 * Sets the color context of the component to one of CoreUI’s themed colors.
2024 * @type Colors
2125 */
2226 @Input ( ) color ?: Colors ;
23- /**
24- * Sets if the color of text should be colored for a light or dark dark background.
25- */
26- @Input ( ) colorScheme ?: 'dark' | 'light' = 'light' ;
2727 /**
2828 * Defines optional container wrapping children elements.
2929 */
@@ -52,8 +52,6 @@ export class NavbarComponent implements AfterContentInit {
5252 const expandClassSuffix : string = this . expand === true ? '' : `-${ this . expand } ` ;
5353 return {
5454 navbar : true ,
55- 'navbar-light' : this . colorScheme === 'light' ,
56- 'navbar-dark' : this . colorScheme === 'dark' ,
5755 [ `navbar-expand${ expandClassSuffix } ` ] : ! ! this . expand ,
5856 [ `bg-${ this . color } ` ] : ! ! this . color ,
5957 [ `${ this . placement } ` ] : ! ! this . placement
0 commit comments