mirror of
https://github.com/jaandrle/deka-dom-el
synced 2024-11-23 17:19:37 +01:00
28 lines
853 B
JavaScript
28 lines
853 B
JavaScript
import { style, el, S } from './exports.js';
|
|
style.css`
|
|
:root{
|
|
color-scheme: dark light;
|
|
}
|
|
`;
|
|
document.head.append(style.element);
|
|
import { fullNameComponent } from './components/fullNameComponent.js';
|
|
import { todosComponent } from './components/todosComponent.js';
|
|
import { CustomHTMLTestElement, CustomSlottingHTMLElement } from "./components/webComponent.js";
|
|
import { thirdParty } from "./components/3rd-party.js";
|
|
|
|
const toggle= S(false);
|
|
document.body.append(
|
|
el("h1", "Experiments:"),
|
|
el(fullNameComponent),
|
|
el(todosComponent),
|
|
el(CustomHTMLTestElement.tagName, { name: "attr" }),
|
|
el(thirdParty),
|
|
el(CustomSlottingHTMLElement.tagName, { onclick: ()=> toggle(!toggle()) }).append(
|
|
el("strong", { slot: "name", textContent: "Honzo" }),
|
|
S.el(toggle, is=> is
|
|
? el("span", "…default slot")
|
|
: el("span", "…custom slot")
|
|
)
|
|
)
|
|
);
|