mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-02 05:23:14 +00:00
refactor: completely remove ionic
This commit is contained in:
35
web/projects/ui/src/app/components/sidebar-host.component.ts
Normal file
35
web/projects/ui/src/app/components/sidebar-host.component.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
Component,
|
||||
Directive,
|
||||
Injectable,
|
||||
} from '@angular/core'
|
||||
import {
|
||||
AbstractTuiPortalHostComponent,
|
||||
AbstractTuiPortalService,
|
||||
TuiDropdownPortalService,
|
||||
} from '@taiga-ui/cdk'
|
||||
|
||||
@Injectable({ providedIn: `root` })
|
||||
export class SidebarService extends AbstractTuiPortalService {}
|
||||
|
||||
@Directive({
|
||||
selector: '[tuiSidebar]',
|
||||
standalone: true,
|
||||
providers: [
|
||||
{ provide: TuiDropdownPortalService, useExisting: SidebarService },
|
||||
],
|
||||
})
|
||||
export class SidebarDirective {}
|
||||
|
||||
@Component({
|
||||
selector: 'sidebar-host',
|
||||
template: '<ng-container #viewContainer></ng-container>',
|
||||
styles: [':host { position: fixed; top: 0; }'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
providers: [
|
||||
{ provide: AbstractTuiPortalService, useExisting: SidebarService },
|
||||
],
|
||||
})
|
||||
export class SidebarHostComponent extends AbstractTuiPortalHostComponent {}
|
||||
Reference in New Issue
Block a user