Add css styles options to all components (#2454)

* add css styling in all components

* formatting

* formatting

* small typo

* small typo

* use builder to add style instead
This commit is contained in:
Abbie Petchtes
2018-09-07 09:08:29 -07:00
committed by Kevin Cunnane
parent 287811f4ab
commit 10f05e75ce
25 changed files with 124 additions and 66 deletions

View File

@@ -42,9 +42,10 @@ export default class ButtonComponent extends ComponentWithIconBase implements IC
@ViewChild('fileInput', { read: ElementRef }) private _fileInputContainer: ElementRef;
constructor(
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService,
@Inject(forwardRef(() => ElementRef)) el: ElementRef
) {
super(changeRef);
super(changeRef, el);
}
ngOnInit(): void {
@@ -63,7 +64,7 @@ export default class ButtonComponent extends ComponentWithIconBase implements IC
if (this._fileInputContainer) {
const self = this;
this._fileInputContainer.nativeElement.onchange = () => {
let file = self._fileInputContainer.nativeElement.files[0];
let file = self._fileInputContainer.nativeElement.files[0];
let reader = new FileReader();
reader.onload = (e) => {
let text = (<FileReader>e.target).result;
@@ -153,7 +154,7 @@ export default class ButtonComponent extends ComponentWithIconBase implements IC
this.setPropertyFromUI<sqlops.ButtonProperties, string>(this.setFileContentProperties, newValue);
}
private setFileContentProperties(properties: sqlops.ButtonProperties, fileContent: string) : void {
private setFileContentProperties(properties: sqlops.ButtonProperties, fileContent: string): void {
properties.fileContent = fileContent;
}