@infinite-canvas-tutorial/webcomponents
Version:
WebComponents UI implementation
41 lines (40 loc) • 1.51 kB
JavaScript
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, LitElement } from 'lit';
import { customElement, property } from 'lit/decorators.js';
let StrokeIcon = class StrokeIcon extends LitElement {
render() {
return html `
<svg
xmlns="http://www.w3.org/2000/svg"
width="100%"
height="100%"
viewBox="0 0 100 100"
>
<style>
.picker {
fill: ${this.value || 'none'};
stroke: var(--spectrum-gray-800);
stroke-width: var(--spectrum-border-width-100);
}
</style>
<path
class="picker"
d="M 50, 50 m 0, -48 a 48, 48, 0, 1, 0, 1, 0 Z m 0 24 a 24, 24, 0, 1, 1, -1, 0 Z"
></path>
</svg>
`;
}
};
__decorate([
property()
], StrokeIcon.prototype, "value", void 0);
StrokeIcon = __decorate([
customElement('ic-spectrum-stroke-icon')
], StrokeIcon);
export { StrokeIcon };
//# sourceMappingURL=stroke-icon.js.map