♻️ Migra #[builder_fn] a #[builder_impl]
Sustituye las ~400 anotaciones `#[builder_fn]` método a método por un único `#[builder_impl]` por `impl`/`trait`, en 74 ficheros de pagetop y sus extensiones (admin, bootsier, menu, user).
This commit is contained in:
parent
c34dc02357
commit
1be3d88888
74 changed files with 104 additions and 394 deletions
|
|
@ -31,6 +31,7 @@ pub struct Crumb {
|
|||
is_current: bool,
|
||||
}
|
||||
|
||||
#[builder_impl]
|
||||
impl Crumb {
|
||||
/// Crea un elemento enlazado a la ruta indicada.
|
||||
pub fn new(label: Lc, route: impl Into<Route>) -> Self {
|
||||
|
|
@ -66,14 +67,12 @@ impl Crumb {
|
|||
// **< Crumb BUILDER >**************************************************************************
|
||||
|
||||
/// Establece el identificador único del elemento.
|
||||
#[builder_fn]
|
||||
pub fn with_id(mut self, id: impl Into<CowStr>) -> Self {
|
||||
self.props.alter_id(id);
|
||||
self
|
||||
}
|
||||
|
||||
/// Modifica identificador, clases CSS o atributos HTML del elemento.
|
||||
#[builder_fn]
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue