🚧 Code tweaks

This commit is contained in:
Manuel Cillero 2023-09-09 07:40:51 +02:00
parent 0989b35925
commit cb18e9a5c6
8 changed files with 8 additions and 8 deletions

View file

@ -40,7 +40,7 @@ impl ComponentTrait for Date {
(self.renderable.check)(cx)
}
fn prepare_component(&self, _: &mut Context) -> PrepareMarkup {
fn prepare_component(&self, _cx: &mut Context) -> PrepareMarkup {
let id = self.name().get().map(|name| concat_string!("edit-", name));
PrepareMarkup::With(html! {
div class=[self.classes().get()] {

View file

@ -23,7 +23,7 @@ impl ComponentTrait for Hidden {
self.weight
}
fn prepare_component(&self, _: &mut Context) -> PrepareMarkup {
fn prepare_component(&self, _cx: &mut Context) -> PrepareMarkup {
let id = self.name().get().map(|name| concat_string!("value-", name));
PrepareMarkup::With(html! {
input type="hidden" id=[id] name=[self.name().get()] value=[self.value().get()] {}

View file

@ -156,7 +156,7 @@ impl Heading {
self.display = display;
self.classes.alter_value(
ClassesOp::SetDefault,
match &self.display() {
match self.display {
HeadingDisplay::XxLarge => "display-2",
HeadingDisplay::Large => "display-3",
HeadingDisplay::Medium => "display-4",

View file

@ -34,7 +34,7 @@ impl ComponentTrait for Icon {
));
}
fn prepare_component(&self, _: &mut Context) -> PrepareMarkup {
fn prepare_component(&self, _cx: &mut Context) -> PrepareMarkup {
PrepareMarkup::With(html! { i class=[self.classes().get()] {} })
}
}

View file

@ -43,7 +43,7 @@ impl ComponentTrait for Image {
(self.renderable.check)(cx)
}
fn prepare_component(&self, _: &mut Context) -> PrepareMarkup {
fn prepare_component(&self, _cx: &mut Context) -> PrepareMarkup {
let (width, height) = match self.size() {
ImageSize::Auto => (None, None),
ImageSize::Size(width, height) => (Some(width), Some(height)),

View file

@ -106,7 +106,7 @@ impl Paragraph {
self.display = display;
self.classes.alter_value(
ClassesOp::SetDefault,
match &self.display() {
match self.display {
ParagraphDisplay::XxLarge => "fs-2",
ParagraphDisplay::Large => "fs-3",
ParagraphDisplay::Medium => "fs-4",

View file

@ -16,7 +16,7 @@ impl ComponentTrait for Html {
COMPONENT_HTML
}
fn prepare_component(&self, _: &mut Context) -> PrepareMarkup {
fn prepare_component(&self, _cx: &mut Context) -> PrepareMarkup {
PrepareMarkup::With(html! { (self.html()) })
}
}

View file

@ -14,6 +14,6 @@ impl Default for Renderable {
}
}
fn render_always(_: &Context) -> bool {
fn render_always(_cx: &Context) -> bool {
true
}