Skip to content

Instantly share code, notes, and snippets.

View roip890's full-sized avatar

Roi Peretz roip890

  • Aptenobytes
View GitHub Profile
@roip890
roip890 / expandable.component.html
Created January 29, 2021 14:17
Expandable component with animation for Angular 10
<div class="expandable">
<div class="expandable__header" (click)="toggleExpended(departmentFilterContent)">
<ng-content select="[expandableHeader]"></ng-content>
<mat-icon class="expand-icon" mat-list-icon [@rotate]="isExpended(departmentFilterContent)">expand_more</mat-icon>
</div>
<div class="expandable__content" #departmentFilterContent [@expand]="isExpended(departmentFilterContent)">
<ng-content select="[expandableContent]"></ng-content>
</div>
</div>