raui_material/component/containers/
horizontal_paper.rs1use crate::component::containers::paper::paper;
2use raui_core::{
3 make_widget,
4 widget::{
5 component::containers::horizontal_box::{horizontal_box, nav_horizontal_box},
6 context::WidgetContext,
7 node::WidgetNode,
8 unit::content::ContentBoxItemLayout,
9 },
10};
11
12pub fn nav_horizontal_paper(context: WidgetContext) -> WidgetNode {
13 let WidgetContext {
14 idref,
15 key,
16 props,
17 listed_slots,
18 ..
19 } = context;
20
21 let inner_props = props.clone().without::<ContentBoxItemLayout>();
22
23 make_widget!(paper)
24 .key(key)
25 .maybe_idref(idref.cloned())
26 .merge_props(props.clone())
27 .listed_slot(
28 make_widget!(nav_horizontal_box)
29 .key("horizontal")
30 .merge_props(inner_props)
31 .listed_slots(listed_slots),
32 )
33 .into()
34}
35
36pub fn horizontal_paper(context: WidgetContext) -> WidgetNode {
37 let WidgetContext {
38 idref,
39 key,
40 props,
41 listed_slots,
42 ..
43 } = context;
44
45 let inner_props = props.clone().without::<ContentBoxItemLayout>();
46
47 make_widget!(paper)
48 .key(key)
49 .maybe_idref(idref.cloned())
50 .merge_props(props.clone())
51 .listed_slot(
52 make_widget!(horizontal_box)
53 .key("horizontal")
54 .merge_props(inner_props)
55 .listed_slots(listed_slots),
56 )
57 .into()
58}