🚚 Simplifica Child[Component] y Typed[Component]
This commit is contained in:
parent
db13a6ab8b
commit
ee84c219cc
12 changed files with 57 additions and 59 deletions
|
|
@ -142,7 +142,7 @@ impl Container {
|
|||
}
|
||||
|
||||
pub fn with_child(mut self, child: impl ComponentTrait) -> Self {
|
||||
self.children.add(ChildComponent::with(child));
|
||||
self.children.add(Child::with(child));
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ impl Grid {
|
|||
}
|
||||
|
||||
pub fn with_item(mut self, item: grid::Item) -> Self {
|
||||
self.items.add(ChildComponent::with(item));
|
||||
self.items.add(Child::with(item));
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ impl Item {
|
|||
}
|
||||
|
||||
pub fn with_child(mut self, child: impl ComponentTrait) -> Self {
|
||||
self.children.add(ChildComponent::with(child));
|
||||
self.children.add(Child::with(child));
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ pub enum NavbarType {
|
|||
#[default]
|
||||
Default,
|
||||
Basic,
|
||||
Offcanvas(TypedComponent<Offcanvas>),
|
||||
Offcanvas(Typed<Offcanvas>),
|
||||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
|
|
@ -52,7 +52,7 @@ impl ComponentTrait for Navbar {
|
|||
let (output, id_content) = if let NavbarType::Offcanvas(oc) = self.navbar_type() {
|
||||
(
|
||||
oc.writable()
|
||||
.alter_children(ChildOp::Prepend(ChildComponent::with(Html::with(elements))))
|
||||
.alter_children(ChildOp::Prepend(Child::with(Html::with(elements))))
|
||||
.render(cx),
|
||||
cx.required_id::<Offcanvas>(oc.id()),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ impl Nav {
|
|||
}
|
||||
|
||||
pub fn with_item(mut self, item: navbar::Item) -> Self {
|
||||
self.items.add(ChildComponent::with(item));
|
||||
self.items.add(Child::with(item));
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ impl Offcanvas {
|
|||
}
|
||||
|
||||
pub fn with_child(mut self, child: impl ComponentTrait) -> Self {
|
||||
self.children.add(ChildComponent::with(child));
|
||||
self.children.add(Child::with(child));
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue