import { Component } from '@angular/core';
import { DemoDrawerComponent } from '@shared';
import { DrawerHelper } from '@yelon/theme';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzMessageService } from 'ng-zorro-antd/message';
@Component({
selector: 'theme-drawer-simple',
template: `
<button nz-button (click)="open()">Open</button>
<button nz-button (click)="static()">Static</button>
`,
standalone: true,
imports: [NzButtonModule]
})
export class ThemeDrawerSimpleComponent {
constructor(
private modalHelper: DrawerHelper,
private msg: NzMessageService
) {}
open(): void {
this.modalHelper.create('View', DemoDrawerComponent, { record: { a: 1, b: '2', c: new Date() } }).subscribe(res => {
this.msg.info(res);
});
}
static(): void {
this.modalHelper.static('View', DemoDrawerComponent, { record: { a: 1, b: '2', c: new Date() } }).subscribe(res => {
this.msg.info(res);
});
}
}