Arrow animation

This commit is contained in:
aditya.chandel
2024-12-29 23:58:07 -07:00
parent dc1f3f5e24
commit 1e82268df6
4 changed files with 31 additions and 20 deletions
@@ -6,9 +6,17 @@
<span>BookLore</span>
</a>
<p-button #menubutton icon="pi pi-arrow-left" [rounded]="true" [outlined]="true" (click)="layoutService.onMenuToggle()"></p-button>
<p-button
#menubutton
icon="pi pi-arrow-left"
[rounded]="true"
[outlined]="true"
(click)="toggleMenu()"
[ngClass]="{ 'rotate-right': !isMenuVisible, 'rotate-left': isMenuVisible }"
>
</p-button>
<div class="xxx">
<div class="topbar-right-items">
<app-search></app-search>
<ul class="topbar-items">
<li>
@@ -9,7 +9,7 @@ import {FormsModule} from '@angular/forms';
import {InputTextModule} from 'primeng/inputtext';
import {SearchComponent} from '../search/search.component';
import {FileUploadComponent} from '../file-upload/file-upload.component';
import {NgIf} from '@angular/common';
import {NgClass, NgIf} from '@angular/common';
import {EventService} from '../../service/event.service';
import {LogNotification} from '../../model/log-notification.model';
import {Button} from 'primeng/button';
@@ -29,7 +29,8 @@ import {StyleClass} from 'primeng/styleclass';
NgIf,
Button,
AppConfiguratorComponent,
StyleClass
StyleClass,
NgClass
],
})
export class AppTopBarComponent implements OnDestroy {
@@ -54,6 +55,13 @@ export class AppTopBarComponent implements OnDestroy {
});
}
isMenuVisible: boolean = true;
toggleMenu() {
this.isMenuVisible = !this.isMenuVisible;
this.layoutService.onMenuToggle();
}
onMouseEnter() {
this.showEvents = true;
}
@@ -90,17 +90,6 @@ export class LayoutService {
}
}
showProfileSidebar() {
this.state.profileSidebarVisible = !this.state.profileSidebarVisible;
if (this.state.profileSidebarVisible) {
this.overlayOpen.next(null);
}
}
showConfigSidebar() {
this.state.configSidebarVisible = true;
}
isOverlay() {
return this.config().menuMode === 'overlay';
}
@@ -109,10 +98,6 @@ export class LayoutService {
return window.innerWidth > 991;
}
isMobile() {
return !this.isDesktop();
}
onConfigUpdate() {
this._config = { ...this.config() };
this.configUpdate.next(this.config());