goyda 0.1.3

A Rust UI toolkit that compiles the same app to Windows, Android, and web
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::components::{Component, LayoutDirection};

pub struct Stack {
    pub direction: LayoutDirection,
    pub spacing: i32,
    pub children: Vec<Component>,
}

impl Stack {
    pub fn new(direction: LayoutDirection, spacing: i32, children: Vec<Component>) -> Component {
        Component::Stack(Self {
            direction,
            spacing,
            children,
        })
    }
}