Cell code fit and finish (#2972)

* add the look and feel for code cell

* formatting

* adding the active cell

* formatting
This commit is contained in:
Abbie Petchtes
2018-10-23 12:22:19 -07:00
committed by GitHub
parent d2eb1488fd
commit 972f857c71
9 changed files with 96 additions and 12 deletions

View File

@@ -20,6 +20,7 @@ export const CODE_SELECTOR: string = 'code-cell-component';
templateUrl: decodeURI(require.toUrl('./codeCell.component.html'))
})
export class CodeCellComponent extends CellView implements OnInit {
@ViewChild('output', { read: ElementRef }) private output: ElementRef;
@Input() cellModel: ICellModel;
constructor(
@Inject(forwardRef(() => CommonServiceInterface)) private _bootstrapService: CommonServiceInterface,
@@ -30,11 +31,17 @@ export class CodeCellComponent extends CellView implements OnInit {
}
ngOnInit() {
this._register(this.themeService.onDidColorThemeChange(this.updateTheme, this));
this.updateTheme(this.themeService.getColorTheme());
}
// Todo: implement layout
public layout() {
}
private updateTheme(theme: IColorTheme): void {
let outputElement = <HTMLElement>this.output.nativeElement;
outputElement.style.borderTopColor = theme.getColor(themeColors.SIDE_BAR_BACKGROUND, true).toString();
}
}