🎨 [bootsier] Mejora menús desplegables Dropdown
This commit is contained in:
parent
28f2703ef1
commit
76bece7540
8 changed files with 654 additions and 72 deletions
31
extensions/pagetop-bootsier/src/theme/aux/size.rs
Normal file
31
extensions/pagetop-bootsier/src/theme/aux/size.rs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
use std::fmt;
|
||||
|
||||
// **< ButtonSize >*********************************************************************************
|
||||
|
||||
/// Tamaño visual de un botón.
|
||||
///
|
||||
/// Controla la escala del botón según el diseño del tema:
|
||||
///
|
||||
/// - `Default`, tamaño por defecto del tema (no añade clase).
|
||||
/// - `Small`, botón compacto.
|
||||
/// - `Large`, botón destacado/grande.
|
||||
#[derive(AutoDefault)]
|
||||
pub enum ButtonSize {
|
||||
#[default]
|
||||
Default,
|
||||
Small,
|
||||
Large,
|
||||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
impl fmt::Display for ButtonSize {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
Self::Default => Ok(()),
|
||||
Self::Small => f.write_str("btn-sm"),
|
||||
Self::Large => f.write_str("btn-lg"),
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue