♻️ Cambia en prepare_component() el tipo devuelto

Elimina `PrepareMarkup` como tipo de retorno de prepare_component() y de
`FnPrepareRender`, sustituyéndolo directamente por `Markup`. Se elimina
una capa innecesaria, ya que html! {} y html! { ... } cubren todos los
casos que ofrecía `PrepareMarkup`.
This commit is contained in:
Manuel Cillero 2026-03-17 20:04:26 +01:00 committed by Manuel Cillero
parent 6203a02b89
commit 908fd969e4
28 changed files with 241 additions and 335 deletions

View file

@ -22,15 +22,15 @@ impl Component for Fieldset {
self.id.get()
}
fn prepare_component(&self, cx: &mut Context) -> PrepareMarkup {
PrepareMarkup::With(html! {
fn prepare_component(&self, cx: &mut Context) -> Markup {
html! {
fieldset id=[self.id()] class=[self.classes().get()] disabled[*self.disabled()] {
@if let Some(legend) = self.legend().lookup(cx) {
legend { (legend) }
}
(self.children().render(cx))
}
})
}
}
}