🚧 Simplify basic components

This commit is contained in:
Manuel Cillero 2024-03-08 22:28:31 +01:00
parent c65ac74a6f
commit 496c9d375b
5 changed files with 14 additions and 32 deletions

View file

@ -9,7 +9,7 @@ impl ComponentTrait for Html {
}
fn prepare_component(&self, _cx: &mut Context) -> PrepareMarkup {
PrepareMarkup::With(html! { (self.html()) })
PrepareMarkup::With(html! { (self.0) })
}
}
@ -18,17 +18,8 @@ impl Html {
Html(html)
}
// Html BUILDER.
#[fn_builder]
pub fn alter_html(&mut self, html: Markup) -> &mut Self {
self.0 = html;
self
}
// Html GETTERS.
pub fn html(&self) -> &Markup {
&self.0
}
}