mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-21 11:15:36 -05:00
added error class to the errorElement in base.ts
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { componentDetailsNavOpen, loadedEnvironments, mode, pyodideLoaded } from '../stores';
|
||||
import { guidGenerator } from '../utils';
|
||||
import { guidGenerator, addClasses } from '../utils';
|
||||
// Premise used to connect to the first available pyodide interpreter
|
||||
let pyodideReadyPromise;
|
||||
let environments;
|
||||
@@ -144,7 +144,10 @@ export class BaseEvalElement extends HTMLElement {
|
||||
Element = pyodide.globals.get('Element');
|
||||
}
|
||||
const out = Element(this.errorElement.id);
|
||||
out.write.callKwargs(err, { append: true });
|
||||
|
||||
addClasses(this.errorElement, ['bg-red-200', 'p-2']);
|
||||
// @ts-ignore
|
||||
out.write.callKwargs(err, { append : true});
|
||||
this.errorElement.hidden = false;
|
||||
this.errorElement.style.display = 'block';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user