use elvis_core::{derive::Setter, value::Unit, Node, Style};
#[derive(Default, Setter)]
pub struct SizedBox {
pub child: Node,
pub height: Unit,
pub width: Unit,
pub max_height: Unit,
pub max_width: Unit,
}
impl Into<Node> for SizedBox {
fn into(self) -> Node {
Node::default().children(vec![self.child]).style(vec![
Style::Height(self.height),
Style::Width(self.width),
Style::MaxHeight(self.max_height),
Style::MaxWidth(self.max_width),
])
}
}