Add styling to icons in state color button module

This commit is contained in:
2025-07-17 22:37:16 -04:00
parent f08d1452f2
commit 5f2b840899
2 changed files with 15 additions and 1 deletions

View File

@@ -21,6 +21,13 @@
mainButton.style.transition = 'background-color 1s'; mainButton.style.transition = 'background-color 1s';
} }
// Icon color
const icon = card?.querySelector('.bubble-icon');
if (icon) {
icon.style.color = state === 'on' ? on_color : 'var(--bubble-main-icon-color)';
icon.style.transition = 'color 1s';
}
// Unavailable state // Unavailable state
if (mainButton && state === 'unavailable') { if (mainButton && state === 'unavailable') {
mainButton.style.opacity = '0.5'; mainButton.style.opacity = '0.5';

View File

@@ -1,6 +1,6 @@
state_color_button: state_color_button:
name: State Color Button name: State Color Button
version: 1.1.2 version: 1.1.3
creator: Tony Stork creator: Tony Stork
supported: supported:
- button - button
@@ -37,6 +37,13 @@ state_color_button:
mainButton.style.transition = 'background-color 1s'; mainButton.style.transition = 'background-color 1s';
} }
// Icon color
const icon = card?.querySelector('.bubble-icon');
if (icon) {
icon.style.color = state === 'on' ? on_color : 'var(--bubble-main-icon-color)';
icon.style.transition = 'color 1s';
}
// Unavailable state // Unavailable state
if (mainButton && state === 'unavailable') { if (mainButton && state === 'unavailable') {
mainButton.style.opacity = '0.5'; mainButton.style.opacity = '0.5';