UNPKG

artistic-elements

Version:
51 lines (50 loc) 1.67 kB
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; import { html, css, LitElement } from 'lit'; import { customElement, property } from 'lit/decorators.js'; let ArtisticCircular = class ArtisticCircular extends LitElement { constructor() { super(...arguments); this.width = '10rem'; this.height = '10rem'; this.color = '#f0f'; } render() { const style = ` width: ${this.width}; height: ${this.height}; background: ${this.color}; `; return html `<div style="${style}"> <slot></slot> </div>`; } }; ArtisticCircular.styles = css ` :host { display: contents; } div { border-radius: 50%; display: flex; align-items: center; justify-content: center; } `; __decorate([ property() ], ArtisticCircular.prototype, "width", void 0); __decorate([ property() ], ArtisticCircular.prototype, "height", void 0); __decorate([ property() ], ArtisticCircular.prototype, "color", void 0); ArtisticCircular = __decorate([ customElement('artistic-circular') ], ArtisticCircular); export { ArtisticCircular };