🚧 Code tweaks
This commit is contained in:
parent
0989b35925
commit
cb18e9a5c6
8 changed files with 8 additions and 8 deletions
|
|
@ -40,7 +40,7 @@ impl ComponentTrait for Date {
|
||||||
(self.renderable.check)(cx)
|
(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));
|
let id = self.name().get().map(|name| concat_string!("edit-", name));
|
||||||
PrepareMarkup::With(html! {
|
PrepareMarkup::With(html! {
|
||||||
div class=[self.classes().get()] {
|
div class=[self.classes().get()] {
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ impl ComponentTrait for Hidden {
|
||||||
self.weight
|
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));
|
let id = self.name().get().map(|name| concat_string!("value-", name));
|
||||||
PrepareMarkup::With(html! {
|
PrepareMarkup::With(html! {
|
||||||
input type="hidden" id=[id] name=[self.name().get()] value=[self.value().get()] {}
|
input type="hidden" id=[id] name=[self.name().get()] value=[self.value().get()] {}
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ impl Heading {
|
||||||
self.display = display;
|
self.display = display;
|
||||||
self.classes.alter_value(
|
self.classes.alter_value(
|
||||||
ClassesOp::SetDefault,
|
ClassesOp::SetDefault,
|
||||||
match &self.display() {
|
match self.display {
|
||||||
HeadingDisplay::XxLarge => "display-2",
|
HeadingDisplay::XxLarge => "display-2",
|
||||||
HeadingDisplay::Large => "display-3",
|
HeadingDisplay::Large => "display-3",
|
||||||
HeadingDisplay::Medium => "display-4",
|
HeadingDisplay::Medium => "display-4",
|
||||||
|
|
|
||||||
|
|
@ -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()] {} })
|
PrepareMarkup::With(html! { i class=[self.classes().get()] {} })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ impl ComponentTrait for Image {
|
||||||
(self.renderable.check)(cx)
|
(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() {
|
let (width, height) = match self.size() {
|
||||||
ImageSize::Auto => (None, None),
|
ImageSize::Auto => (None, None),
|
||||||
ImageSize::Size(width, height) => (Some(width), Some(height)),
|
ImageSize::Size(width, height) => (Some(width), Some(height)),
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ impl Paragraph {
|
||||||
self.display = display;
|
self.display = display;
|
||||||
self.classes.alter_value(
|
self.classes.alter_value(
|
||||||
ClassesOp::SetDefault,
|
ClassesOp::SetDefault,
|
||||||
match &self.display() {
|
match self.display {
|
||||||
ParagraphDisplay::XxLarge => "fs-2",
|
ParagraphDisplay::XxLarge => "fs-2",
|
||||||
ParagraphDisplay::Large => "fs-3",
|
ParagraphDisplay::Large => "fs-3",
|
||||||
ParagraphDisplay::Medium => "fs-4",
|
ParagraphDisplay::Medium => "fs-4",
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ impl ComponentTrait for Html {
|
||||||
COMPONENT_HTML
|
COMPONENT_HTML
|
||||||
}
|
}
|
||||||
|
|
||||||
fn prepare_component(&self, _: &mut Context) -> PrepareMarkup {
|
fn prepare_component(&self, _cx: &mut Context) -> PrepareMarkup {
|
||||||
PrepareMarkup::With(html! { (self.html()) })
|
PrepareMarkup::With(html! { (self.html()) })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,6 @@ impl Default for Renderable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn render_always(_: &Context) -> bool {
|
fn render_always(_cx: &Context) -> bool {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue