💥 Improved container add method names

This commit is contained in:
Manuel Cillero 2023-10-21 20:41:11 +02:00
parent 0613278f7a
commit 71e6d4cf88
8 changed files with 8 additions and 8 deletions

View file

@ -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
}

View file

@ -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
}

View file

@ -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
}

View file

@ -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

View file

@ -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
}

View file

@ -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
}

View file

@ -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
}

View file

@ -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
}