mirror of
https://github.com/danbulant/mangui
synced 2026-06-20 06:41:10 +00:00
24 lines
558 B
Rust
24 lines
558 B
Rust
use rusalka_macro::make_component;
|
|
use std::default::Default;
|
|
use mangui::{SharedNode, nodes::Style, taffy::prelude::Size, femtovg::{Paint, Color}, nodes::layout::Layout};
|
|
|
|
use rusalka::nodes::primitives::{Rectangle, RectangleAttributes};
|
|
|
|
make_component!(
|
|
ComponentDemo,
|
|
Logic {
|
|
let radius = attrs.radius;
|
|
}
|
|
Attributes {
|
|
radius: f32
|
|
}
|
|
Component {
|
|
@layout {
|
|
@Rectangle {
|
|
radius,
|
|
..Default::default()
|
|
}
|
|
..Default::default()
|
|
}
|
|
}
|
|
);
|