♻️ Rename types for Mixed and Typed components

This commit is contained in:
Manuel Cillero 2024-03-07 21:27:36 +01:00
parent 57e71a9399
commit c65ac74a6f
20 changed files with 151 additions and 154 deletions

View file

@ -4,7 +4,7 @@ pub use error::ErrorPage;
pub use actix_web::Result as ResultPage;
use crate::base::action;
use crate::core::component::{ComponentTrait, MixedComponents, OneComponent};
use crate::core::component::{AnyComponent, ComponentTrait, MixedComponents};
use crate::core::component::{Context, ContextOp};
use crate::core::theme::ComponentsInRegions;
use crate::fn_builder;
@ -106,8 +106,7 @@ impl Page {
#[fn_builder]
pub fn alter_component(&mut self, component: impl ComponentTrait) -> &mut Self {
self.regions
.add_in("content", OneComponent::with(component));
self.regions.add(AnyComponent::with(component));
self
}
@ -117,7 +116,7 @@ impl Page {
region: &'static str,
component: impl ComponentTrait,
) -> &mut Self {
self.regions.add_in(region, OneComponent::with(component));
self.regions.add_in(region, AnyComponent::with(component));
self
}