import { Component, OnInit, Input, TemplateRef } from '@angular/core'; import { animate, trigger, state, style, transition } from '@angular/animations'; @Component({ selector: 'rh-basic-drawer', templateUrl: './basic-drawer.component.html', styleUrls: ['./basic-drawer.component.less'], animations: [ trigger('drawerVisible', [ state('hidden', style({ opacity: 0, transform: 'translate3d(100%,0,0)' })), state('visible', style({ opacity: 1, transform: 'translate3d(0,0,0)' })), transition('hidden <=> visible', animate('300ms ease-in-out')) ]) ] }) export class RhBasicDrawerComponent implements OnInit { @Input() rhVisible = false; @Input() rhDrawer!: TemplateRef; constructor() { // } ngOnInit() { // } }