UNPKG

isomtrik-quickchat

Version:

isomtrik-quickchat is a lightweight, real-time chat component built with Stencil JS. It is designed to be seamlessly integrated into web applications, offering customizable and responsive chat functionalities. The module supports both CommonJS and ES modu

61 lines (51 loc) 1.36 kB
import { css, html, LitElement } from 'lit'; class SpinnerLoader extends LitElement { static properties = { height: { type: String }, width: { type: String }, spinTime: { type: String }, spinnerPrimaryColor: { type: String }, spinnerSecondaryColor: { type: String }, spinnerBorderWidth: { type: String }, }; static styles = css` .spinner { border-radius: 50%; z-index: 10; } .main-container { position: relative; width: 100%; display: flex; align-items: center; justify-content: center; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } `; render() { return html` <div class="main-container"> <div class="spinner" style=" border-color: ${this.spinnerSecondaryColor}; border-width: ${this.spinnerBorderWidth}; border-style: solid; border-top-color: ${this.spinnerPrimaryColor}; height: ${this.height}; width: ${this.width}; animation: spin ${this.spinTime} linear infinite; " ></div> </div> `; } } customElements.define('spinner-loader', SpinnerLoader);