UNPKG

lemora-bot

Version:

Advanced AI-Powered Trading Signals & Wallet Monitoring for Solana

47 lines (39 loc) 1.26 kB
/** * Lemora Wallet Tracker - Side Panel UI Implementation * Constructs and manages the user interface side panel */ import { UIComponent, UITheme } from '../types/ui.types'; export class SidePanel { private container: HTMLElement; private theme: UITheme; constructor(containerId: string, theme: UITheme) { this.container = document.getElementById(containerId) as HTMLElement; this.theme = theme; this.applyTheme(); } /** * Renders the side panel components */ public render(components: UIComponent[]): void { components.forEach(component => { const element = this.createComponentElement(component); this.container.appendChild(element); }); } /** * Creates a UI component element */ private createComponentElement(component: UIComponent): HTMLElement { const element = document.createElement('div'); element.className = component.props.className || ''; // Additional component setup logic based on type return element; } /** * Applies the theme to the side panel */ private applyTheme(): void { this.container.style.backgroundColor = this.theme.background; this.container.style.color = this.theme.text; } }