oswilno/crates/web-assets/assets/elements/oswilno-error.js
2023-08-09 15:52:35 +02:00

16 lines
382 B
JavaScript

import { copyCss } from "../css.js";
customElements.define('oswilno-error', class extends HTMLElement {
constructor() {
super();
const shadow = this.attachShadow({ mode: 'open' });
shadow.innerHTML = `
<style>:host{display:block;}</style>
<div class="flex bg-red-100 rounded-lg p-4 mb-4 text-sm text-red-700">
<slot></slot>
<div>
`;
copyCss(shadow);
}
});