{#if selectAccentColor} Accent Color { if (typeof previous === 'string' || typeof color === 'string') { return; } document.documentElement.classList.remove(previous.label.toLowerCase()); document.documentElement.classList.add(color.label.toLowerCase()); accentColor = color.label; window.dispatchEvent( new CustomEvent('theme-changed', { detail: { accentColor: color.label } }) ); onchanged?.(accentColor, baseColor); }} class="w-64" /> {/if} {#if selectBaseColor} Base Color { if (typeof previous === 'string' || typeof color === 'string') { return; } document.documentElement.classList.remove(previous.label.toLowerCase()); document.documentElement.classList.add(color.label.toLowerCase()); baseColor = color.label; window.dispatchEvent( new CustomEvent('theme-changed', { detail: { baseColor: color.label } }) ); onchanged?.(accentColor, baseColor); }} /> {/if}