diff --git a/projects/kit/directives/button-close/button-close.directive.ts b/projects/kit/directives/button-close/button-close.directive.ts index a1fcf415ee90..5bf93afba6cd 100644 --- a/projects/kit/directives/button-close/button-close.directive.ts +++ b/projects/kit/directives/button-close/button-close.directive.ts @@ -1,8 +1,6 @@ -import {Directive} from '@angular/core'; +import {Directive, inject} from '@angular/core'; import {tuiButtonOptionsProvider} from '@taiga-ui/core/components/button'; -import {TUI_ICON_START} from '@taiga-ui/core/tokens'; - -import {TUI_BUTTON_CLOSE_ICON} from './button-close.options'; +import {TUI_COMMON_ICONS, TUI_ICON_START} from '@taiga-ui/core/tokens'; @Directive({ standalone: true, @@ -11,7 +9,7 @@ import {TUI_BUTTON_CLOSE_ICON} from './button-close.options'; tuiButtonOptionsProvider({appearance: 'neutral', size: 's'}), { provide: TUI_ICON_START, - useExisting: TUI_BUTTON_CLOSE_ICON, + useFactory: () => inject(TUI_COMMON_ICONS).close, }, ], host: { diff --git a/projects/kit/directives/button-close/button-close.options.ts b/projects/kit/directives/button-close/button-close.options.ts deleted file mode 100644 index d92e08e72cac..000000000000 --- a/projects/kit/directives/button-close/button-close.options.ts +++ /dev/null @@ -1,3 +0,0 @@ -import {tuiCreateToken} from '@taiga-ui/cdk/utils/miscellaneous'; - -export const TUI_BUTTON_CLOSE_ICON = tuiCreateToken('@tui.x'); diff --git a/projects/kit/directives/button-close/index.ts b/projects/kit/directives/button-close/index.ts index 37db0c6cdf42..68cf88a2a523 100644 --- a/projects/kit/directives/button-close/index.ts +++ b/projects/kit/directives/button-close/index.ts @@ -1,2 +1 @@ export * from './button-close.directive'; -export * from './button-close.options';