makemusicrecordsbr-theme-provider
v1.2.0
Published
Global theme switcher para Make Music Records
Downloads
498
Maintainers
Readme
@makemusicrecords/theme-provider
Global theme switcher para Make Music Records.
Instalação
npm install @makemusicrecords/theme-providerUso
import { initTheme, setTheme, getTheme } from '@makemusicrecords/theme-provider';
// Inicializar (auto no carregamento)
initTheme();
// Obter tema atual
const current = getTheme(); // "dark" | "light" | "ice"
// Mudar tema
setTheme('light');
// Observar mudanças
window.addEventListener('theme-changed', (e) => {
console.log('Novo tema:', e.detail.theme);
});Cookies
Armazena em cookie global:
- Nome:
__mm_theme - Domínio:
.makemusicrecords.com.br(compartilhado entre subdomínios) - TTL: 1 ano
Temas Disponíveis
dark— Studio Noir (hue 22)light— Atelier (hue 218)ice— Alias para light
