feat: demo version additions

This commit is contained in:
Sergey Andrievskiy 2021-08-06 18:48:35 +03:00
parent 0eec54695f
commit eee950248e
322 changed files with 23456 additions and 188 deletions

View file

@ -0,0 +1,22 @@
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
@Component({
selector: 'ngx-inline-example-block',
template: `
<ngx-example-block *ngIf="isOneFile" [content]="content"></ngx-example-block>
<ngx-tabbed-example-block *ngIf="isTabbed" [content]="content"></ngx-tabbed-example-block>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class NgxInlineExampleBlockComponent {
@Input() content;
get isOneFile(): boolean {
return !this.isTabbed;
}
get isTabbed(): boolean {
return this.content.files.length > 1;
}
}