♻️ Weight is a property of mixed components struct
This commit is contained in:
parent
322cd9b6bf
commit
45cb063e52
23 changed files with 60 additions and 266 deletions
|
|
@ -13,7 +13,6 @@ pub enum PoweredByLogo {
|
|||
#[rustfmt::skip]
|
||||
#[derive(AutoDefault)]
|
||||
pub struct PoweredBy {
|
||||
weight : Weight,
|
||||
renderable: Renderable,
|
||||
copyright : Option<String>,
|
||||
logo : PoweredByLogo,
|
||||
|
|
@ -29,10 +28,6 @@ impl ComponentTrait for PoweredBy {
|
|||
}
|
||||
}
|
||||
|
||||
fn weight(&self) -> Weight {
|
||||
self.weight
|
||||
}
|
||||
|
||||
fn is_renderable(&self, cx: &Context) -> bool {
|
||||
(self.renderable.check)(cx)
|
||||
}
|
||||
|
|
@ -67,12 +62,6 @@ impl ComponentTrait for PoweredBy {
|
|||
impl PoweredBy {
|
||||
// PoweredBy BUILDER.
|
||||
|
||||
#[fn_builder]
|
||||
pub fn alter_weight(&mut self, value: Weight) -> &mut Self {
|
||||
self.weight = value;
|
||||
self
|
||||
}
|
||||
|
||||
#[fn_builder]
|
||||
pub fn alter_renderable(&mut self, check: FnIsRenderable) -> &mut Self {
|
||||
self.renderable.check = check;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue