HexGrid = {
class HexGrid extends LitElement {
static get styles() {
return lit.css`
:host {
display: inline-block;
border: 2px solid indigo;
padding: 0.5rem 1.5rem;
margin-bottom: 1rem; }
p {
color: indigo;
font-family: 'Georgia'; }`;
}
static get properties() {
return {
name: { type: String }
}
}
constructor() {
super();
this.name = 'Somebody';
}
render() {
return lit.html`<p>Hello, <em>${this.name}!</em></p>`;
}
}
if( !window.customElements.get( 'hex-grid')) {
window.customElements.define('hex-grid', HexGrid)
}
return HexGrid
}