diff --git a/components/navigation/sidebar.go b/components/navigation/sidebar.go index e8d6e7a..d7d3f7a 100644 --- a/components/navigation/sidebar.go +++ b/components/navigation/sidebar.go @@ -10,9 +10,9 @@ type Sidebar struct { BottomEntries vugu.Builder `vugu:"data"` // Static bottom part of the sidebar. Body vugu.Builder `vugu:"data"` // The body contains the content that is right to or behind the sidebar. - Minimized bool `vugu:"data"` // If true, the sidebar is reduced to icons. - sidebarClasses string - bodyOverlayStyle string + Minimized bool `vugu:"data"` // If true, the sidebar is reduced to icons. + sidebarClasses string + showBodyOverlay bool } func (c *Sidebar) Init(ctx vugu.InitCtx) { @@ -22,10 +22,10 @@ func (c *Sidebar) Init(ctx vugu.InitCtx) { func (c *Sidebar) Compute(ctx vugu.ComputeCtx) { if c.Minimized { c.sidebarClasses = "d3c-1633357633-sidebar-minimized" - c.bodyOverlayStyle = "display: none;" + c.showBodyOverlay = false } else { c.sidebarClasses = "" - c.bodyOverlayStyle = "" + c.showBodyOverlay = true } } diff --git a/components/navigation/sidebar.vugu b/components/navigation/sidebar.vugu index 8f51a39..cf7a04e 100644 --- a/components/navigation/sidebar.vugu +++ b/components/navigation/sidebar.vugu @@ -16,7 +16,7 @@