💥 Improved container add method names
This commit is contained in:
parent
0613278f7a
commit
71e6d4cf88
8 changed files with 8 additions and 8 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue