Skip to content

Commit 0fd4283

Browse files
committed
refactor(button-close): deprecate white input prop, use ThemeDirective composition for dark prop
1 parent 415188b commit 0fd4283

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

projects/coreui-angular/src/lib/button/button-close.directive.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
import { booleanAttribute, Directive, HostBinding, Input } from '@angular/core';
2+
import { ThemeDirective } from '../shared/theme.directive';
23
import { ButtonDirective } from './button.directive';
34

45
@Directive({
56
selector: '[cButtonClose]',
6-
standalone: true
7+
standalone: true,
8+
hostDirectives: [
9+
{ directive: ThemeDirective, inputs: ['dark'] }
10+
]
711
})
812
export class ButtonCloseDirective extends ButtonDirective {
913

1014
/**
1115
* Change the default color to white.
1216
* @type boolean
17+
* @deprecated 5.0.0. Use `cButtonClose.dark` instead.
1318
*/
1419
@Input({ transform: booleanAttribute }) white: string | boolean = false;
1520

0 commit comments

Comments
 (0)