#[must_use]
pub struct Sidebar {
pub(crate) width: f32,
pub(crate) collapsible: bool,
pub(crate) responsive: bool,
}
impl Default for Sidebar {
fn default() -> Self {
Self::new()
}
}
impl Sidebar {
pub fn new() -> Self {
Self {
width: 256.0,
collapsible: false,
responsive: true,
}
}
pub fn width(mut self, width: f32) -> Self {
self.width = width;
self
}
pub fn collapsible(mut self) -> Self {
self.collapsible = true;
self
}
pub fn static_(mut self) -> Self {
self.responsive = false;
self
}
}