UNPKG

x-weather

Version:

A collection of web components implementing portions of the OpenWeatherMap API.

2 lines (1 loc) 1.39 kB
import{_ as e}from"./_rollupPluginBabelHelpers-5bd7183e.js";import{L as t,c as n,h as r}from"./lit-element-ae08ccac.js";function i(){var t=e(['\n <ul>\n <li>\n <slot name="x-date-time"></slot>\n </li>\n <li>\n <slot name="x-weather-item-temperature"></slot>\n </li>\n <li>\n <img alt="','" src="','"></img>\n </li>\n </ul>\n ']);return i=function(){return t},t}function a(){var t=e(["\n :host {\n display: block;\n }\n\n img {\n display: var(--x-weather-item-icon-display, block);\n height: var(--x-weather-item-icon-height, 7.5rem);\n margin: var(--x-weather-item-icon-margin, auto);\n width: var(--x-weather-item-icon-width, 7.5rem);\n }\n\n ul {\n list-style-type: none;\n padding: 0;\n }\n\n ul > li {\n text-align: center;\n }\n "]);return a=function(){return t},t}var s=class extends t{static get styles(){return n(a())}static get properties(){return{datetime:{type:Number},iconalt:{type:String},iconsrc:{type:String}}}render(){var e="https://openweathermap.org/themes/openweathermap/assets/vendor/owm/img/widgets/".concat(this.iconsrc,".png");return r(i(),this.iconalt,e)}};customElements.get("x-weather-item")||customElements.define("x-weather-item",s);export default s;export{s as XWeatherItem};