Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { customElement, html, LitElement, property } from 'lit-element/lit-element';
import CSS from './app-icon-css';
export type Icon = string | {
type: string;
color: string;
background: string;
};
@customElement('ui-app-icon')
export class AppIcon extends LitElement {
public static styles = [CSS];
@property()
public icon?: Icon;
@property({ reflect: true, type: Boolean })
public shadow?: Icon;
public render() {
if (!this.icon) return html``;
const icon = typeof this.icon === 'string'
? html`<img class="rounded" src="${this.icon}">`
: html`