diff --git a/pagetop/src/base/component/block.rs b/pagetop/src/base/component/block.rs index 60cb01fa..b9671ef8 100644 --- a/pagetop/src/base/component/block.rs +++ b/pagetop/src/base/component/block.rs @@ -93,7 +93,7 @@ impl Block { self } - pub fn with_component(mut self, component: impl ComponentTrait) -> Self { + pub fn add_component(mut self, component: impl ComponentTrait) -> Self { self.stuff.alter(ArcOp::Add(ArcComponent::with(component))); self } diff --git a/pagetop/src/base/component/flex/container.rs b/pagetop/src/base/component/flex/container.rs index 700afe31..da37b150 100644 --- a/pagetop/src/base/component/flex/container.rs +++ b/pagetop/src/base/component/flex/container.rs @@ -92,7 +92,7 @@ impl Container { self } - pub fn with_item(mut self, item: flex::Item) -> Self { + pub fn add_item(mut self, item: flex::Item) -> Self { self.items.alter(TypedOp::Add(TypedComponent::with(item))); self } diff --git a/pagetop/src/base/component/flex/item.rs b/pagetop/src/base/component/flex/item.rs index 542929a7..1b44f26f 100644 --- a/pagetop/src/base/component/flex/item.rs +++ b/pagetop/src/base/component/flex/item.rs @@ -149,7 +149,7 @@ impl Item { self } - pub fn with_component(mut self, component: impl ComponentTrait) -> Self { + pub fn add_component(mut self, component: impl ComponentTrait) -> Self { self.stuff.alter(ArcOp::Add(ArcComponent::with(component))); self } diff --git a/pagetop/src/base/component/menu/group.rs b/pagetop/src/base/component/menu/group.rs index 8c8a19ea..c4cc7c07 100644 --- a/pagetop/src/base/component/menu/group.rs +++ b/pagetop/src/base/component/menu/group.rs @@ -66,7 +66,7 @@ impl Group { self } - pub fn with_element(mut self, element: Element) -> Self { + pub fn add_element(mut self, element: Element) -> Self { self.elements .alter(TypedOp::Add(TypedComponent::with(element))); self diff --git a/pagetop/src/base/component/menu/megamenu.rs b/pagetop/src/base/component/menu/megamenu.rs index 602c26ad..80899f1d 100644 --- a/pagetop/src/base/component/menu/megamenu.rs +++ b/pagetop/src/base/component/menu/megamenu.rs @@ -66,7 +66,7 @@ impl Megamenu { self } - pub fn with_group(mut self, group: Group) -> Self { + pub fn add_group(mut self, group: Group) -> Self { self.groups.alter(TypedOp::Add(TypedComponent::with(group))); self } diff --git a/pagetop/src/base/component/menu/menu_main.rs b/pagetop/src/base/component/menu/menu_main.rs index 04767626..f02517ba 100644 --- a/pagetop/src/base/component/menu/menu_main.rs +++ b/pagetop/src/base/component/menu/menu_main.rs @@ -102,7 +102,7 @@ impl Menu { self } - pub fn with_item(mut self, item: Item) -> Self { + pub fn add_item(mut self, item: Item) -> Self { self.items.alter(TypedOp::Add(TypedComponent::with(item))); self } diff --git a/pagetop/src/base/component/menu/submenu.rs b/pagetop/src/base/component/menu/submenu.rs index 07ff5504..e58a93d6 100644 --- a/pagetop/src/base/component/menu/submenu.rs +++ b/pagetop/src/base/component/menu/submenu.rs @@ -78,7 +78,7 @@ impl Submenu { self } - pub fn with_item(mut self, item: Item) -> Self { + pub fn add_item(mut self, item: Item) -> Self { self.items.alter(TypedOp::Add(TypedComponent::with(item))); self } diff --git a/pagetop/src/base/component/wrapper.rs b/pagetop/src/base/component/wrapper.rs index 35a20104..75061dc7 100644 --- a/pagetop/src/base/component/wrapper.rs +++ b/pagetop/src/base/component/wrapper.rs @@ -154,7 +154,7 @@ impl Wrapper { self } - pub fn with_component(mut self, component: impl ComponentTrait) -> Self { + pub fn add_component(mut self, component: impl ComponentTrait) -> Self { self.stuff.alter(ArcOp::Add(ArcComponent::with(component))); self }