Skip to content

Commit

Permalink
chore: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
waterplea authored and splincode committed Jan 3, 2025
1 parent a54326b commit 6687699
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,22 @@ export class TuiAccordionComponent {
@ContentChildren(TuiAccordionDirective, {static: true} as any)

Check warning on line 43 in projects/experimental/components/accordion/accordion.component.ts

View check run for this annotation

codefactor.io / CodeFactor

projects/experimental/components/accordion/accordion.component.ts#L43

Unexpected any. Specify a different type. (@typescript-eslint/no-explicit-any)
public readonly directives: QueryList<TuiAccordionDirective> = EMPTY_QUERY;

@Input()
public closeOthers = true;

public readonly size = signal<TuiSizeS | TuiSizeL>('l');

@Input('size')
set sizeSetter(size: TuiSizeS | TuiSizeL) {
this.size.set(size);
}

@Input()
public closeOthers = true;

toggle(directive: TuiAccordionDirective, value: boolean): void {
if (this.closeOthers && value) {
this.expands.forEach((expand) => (expand.expanded = false));
this.expands.forEach((expand) => {
expand.expanded = false;
});

this.directives.forEach((dir) => {
if (dir === directive) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {
Output,
signal,
} from '@angular/core';
import {tuiDirectiveBinding} from '@taiga-ui/cdk';
import {TuiButton, tuiButtonOptionsProvider} from '@taiga-ui/core';
import {TuiChevron} from '@taiga-ui/kit';
import {tuiDirectiveBinding} from '@taiga-ui/cdk/utils';
import {TuiButton, tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';
import {TuiChevron} from '@taiga-ui/kit/directives/chevron';

import {TuiAccordionComponent} from './accordion.component';

Expand All @@ -31,14 +31,14 @@ export class TuiAccordionDirective implements OnChanges {

protected readonly size = tuiDirectiveBinding(TuiButton, 'size', this.accordion.size);

public readonly open = tuiDirectiveBinding(TuiChevron, 'tuiChevron', signal(false));

@Input()
public tuiAccordion: boolean | string = '';

@Output()
public readonly tuiAccordionChange = new EventEmitter<boolean>();

public readonly open = tuiDirectiveBinding(TuiChevron, 'tuiChevron', signal(false));

public ngOnChanges(): void {
this.open.set(!!this.tuiAccordion);
this.accordion.toggle(this, this.open());
Expand Down

0 comments on commit 6687699

Please sign in to comment.