Añade identificador en componentes

This commit is contained in:
Manuel Cillero 2023-06-08 00:12:07 +02:00
parent cb04a29388
commit f0e4aea672
18 changed files with 77 additions and 90 deletions

View file

@ -34,6 +34,10 @@ impl ComponentTrait for Paragraph {
COMPONENT_PARAGRAPH
}
fn id(&self) -> Option<String> {
self.id.get()
}
fn weight(&self) -> isize {
self.weight
}
@ -45,7 +49,7 @@ impl ComponentTrait for Paragraph {
fn default_render(&self, rcx: &mut RenderContext) -> Markup {
html! {
p
id=[self.id().get()]
id=[self.id()]
class=[self.classes().get()]
{
(self.components().render(rcx))
@ -125,10 +129,6 @@ impl Paragraph {
// Paragraph GETTERS.
pub fn id(&self) -> &IdentifierValue {
&self.id
}
pub fn classes(&self) -> &Classes {
&self.classes
}