UNPKG

pipeline-builder-demo

Version:
45 lines (35 loc) 984 B
import {Component, OnInit, ViewChild, Input} from '@angular/core'; import {CodeEditorComponent} from './code-editor/code-editor.component'; @Component({ selector: 'pb-right-editor', host: { '[class.hide-btn-label]': 'hideBtnLabel' }, templateUrl: './right-editor.component.html', styleUrls: ['./right-editor.component.scss'] }) export class RightEditorComponent implements OnInit { private currentTab: string; @ViewChild(CodeEditorComponent) private codeEditor: CodeEditorComponent; private hideBtnLabel: boolean; constructor() { this.currentTab = 'wdl'; } ngOnInit() { } setTab = (tab): void => { this.currentTab = tab; }; isTab = (tab: string): boolean => { return this.currentTab === tab; }; generateCode = () => { if(!this.codeEditor){ return; } this.codeEditor.updateCode(); } setFlexClass = (isHide: boolean) => { this.hideBtnLabel = isHide; }; }