Toggle the sidebar open/closed state
(&self)
| 106 | impl SidebarCtx { |
| 107 | /// Toggle the sidebar open/closed state |
| 108 | pub fn toggle(&self) { |
| 109 | if (self.is_mobile)() { |
| 110 | let current = (self.open_mobile)(); |
| 111 | let mut open_mobile = self.open_mobile; |
| 112 | open_mobile.set(!current); |
| 113 | } else { |
| 114 | self.set_open.call(!self.open()); |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | /// Set the mobile sidebar open state |
| 119 | pub fn set_open_mobile(&self, value: bool) { |