diff --git a/example/connect.js b/example/connect.js index 0052fea..b3243a8 100644 --- a/example/connect.js +++ b/example/connect.js @@ -1,8 +1,7 @@ -import { l1 } from "../stear/extra/Elements/loading1.js"; +import l1 from "../stear/extra/Elements/loading1.js"; import alert from "../stear/extra/Pages/alert.js"; import { _ } from "../stear/main.js"; import { fadein, fadeout, wait } from "../stear/utils.js"; -//import "./waitStyle.js"; export const preRender = true; @@ -31,7 +30,7 @@ export const call = async (stear, { find, resolve, render, call }, {name,id}) => await wait(1000); var success = Math.random()>0.25; if(success){ - await call(alert, { titel: "Connecting", text: "success" }); + await call(alert, { text: "success" }); await fadeout(find.main._); return resolve(true); }else{ diff --git a/stear/extra/Elements/loading1.js b/stear/extra/Elements/loading1.js index 23cc5db..8b18fa4 100644 --- a/stear/extra/Elements/loading1.js +++ b/stear/extra/Elements/loading1.js @@ -12,6 +12,7 @@ export class loading1 extends class_{ export const l1 = (color="black") => new loading1(color); +export default l1; var animation = Stear.addAnimation({ "0%": { left: "4%", top: "4%" }, diff --git a/stear/extra/Pages/alert.js b/stear/extra/Pages/alert.js index 385d174..ff5be32 100644 --- a/stear/extra/Pages/alert.js +++ b/stear/extra/Pages/alert.js @@ -7,6 +7,7 @@ const render = ({ }, {titel,text,callback}) => { return _({ find:"main", + class:"alert", style: { position:"fixed", left: "0", @@ -24,10 +25,10 @@ const render = ({ }, {titel,text,callback}) => { paddingTop: "0", position: "absolute", backgroundColor: "#eee", - minHeight:"4rem", - minWidth:"8rem", - borderRadius:"1rem", - textAlign:"center" + minHeight: "4rem", + minWidth: "8rem", + borderRadius: "1rem", + textAlign: "center" } }, [ _({ type: "h2", style: { marginBottom: 0 }}, titel),