ts strict - getAttribute (#863)

* ts strict getAttribute

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* mark xfail

* fix to string

* Remove

* use getAttribute for theme

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Ted Patrick
2022-10-21 07:47:44 -05:00
committed by GitHub
parent 58b4df6b3d
commit c352b502c4
11 changed files with 131 additions and 80 deletions

View File

@@ -1,5 +1,5 @@
import { BaseEvalElement } from './base';
import { addClasses, htmlDecode } from '../utils';
import { getAttribute, addClasses, htmlDecode } from '../utils';
import { getLogger } from '../logger'
import type { Runtime } from '../runtime';
@@ -7,14 +7,15 @@ const logger = getLogger('py-inputbox');
export function make_PyInputBox(runtime: Runtime) {
class PyInputBox extends BaseEvalElement {
widths: Array<string>;
label: string;
mount_name: string;
widths: string[] = [];
label: string | undefined = undefined;
mount_name: string | undefined = undefined;
constructor() {
super();
if (this.hasAttribute('label')) {
this.label = this.getAttribute('label');
const label = getAttribute( this, "label");
if (label) {
this.label = label;
}
}