diff --git a/Public/TopNotificationBar/Infrastructure/Ui/TopNotificationBarRenderer.php b/Public/TopNotificationBar/Infrastructure/Ui/TopNotificationBarRenderer.php index 288995c8..1f08d3dd 100644 --- a/Public/TopNotificationBar/Infrastructure/Ui/TopNotificationBarRenderer.php +++ b/Public/TopNotificationBar/Infrastructure/Ui/TopNotificationBarRenderer.php @@ -243,7 +243,19 @@ final class TopNotificationBarRenderer implements RendererInterface */ private function buildClasses(array $data): string { - return 'top-notification-bar'; + $classes = ['top-notification-bar']; + + // Agregar clases de visibilidad responsive + $showOnDesktop = ($data['visibility']['show_on_desktop'] ?? true) === true; + $showOnMobile = ($data['visibility']['show_on_mobile'] ?? true) === true; + + $visibilityClasses = $this->getVisibilityClasses($showOnDesktop, $showOnMobile); + + if ($visibilityClasses !== null) { + $classes[] = $visibilityClasses; + } + + return implode(' ', $classes); } /**