UNPKG

artistic-elements

Version:
70 lines (67 loc) 1.67 kB
import { __decorateClass, e, e2, i, s, y } from "./chunk.FMUK5F65.js"; // src/artistic/triangle-rectangle.ts var ArtisticTriangleRectangle = class extends s { constructor() { super(...arguments); this.width = 10; this.height = 10; this.borderStyle = "solid"; this.topColor = "#f0f"; this.rightColor = "#0f0"; this.bottomColor = "#ff0"; this.leftColor = "#00f"; } render() { const style = ` border-width: ${this.height / 2}rem ${this.width / 2}rem ${this.height / 2}rem ${this.width / 2}rem; border-style: ${this.borderStyle}; border-top-color: ${this.topColor}; border-right-color: ${this.rightColor}; border-bottom-color: ${this.bottomColor}; border-left-color: ${this.leftColor}; `; return y`<div style="${style}"> <slot></slot> </div>`; } }; ArtisticTriangleRectangle.styles = i` div { width: 0; height: 0; } `; __decorateClass([ e2() ], ArtisticTriangleRectangle.prototype, "width", 2); __decorateClass([ e2() ], ArtisticTriangleRectangle.prototype, "height", 2); __decorateClass([ e2() ], ArtisticTriangleRectangle.prototype, "borderStyle", 2); __decorateClass([ e2() ], ArtisticTriangleRectangle.prototype, "topColor", 2); __decorateClass([ e2() ], ArtisticTriangleRectangle.prototype, "rightColor", 2); __decorateClass([ e2() ], ArtisticTriangleRectangle.prototype, "bottomColor", 2); __decorateClass([ e2() ], ArtisticTriangleRectangle.prototype, "leftColor", 2); ArtisticTriangleRectangle = __decorateClass([ e("artistic-triangle-rectangle") ], ArtisticTriangleRectangle); export { ArtisticTriangleRectangle };