16 lines
382 B
JavaScript
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);
|
||
|
}
|
||
|
});
|