diff --git a/nbcl/panel/panel_component.nbcl b/nbcl/panel/panel_component.nbcl index 7b6f54b..710a1c4 100644 --- a/nbcl/panel/panel_component.nbcl +++ b/nbcl/panel/panel_component.nbcl @@ -1,5 +1,5 @@ import "nbcl/components/datetime_widg.nbcl" as datetime_widg { * } -import "nbcl/panel/panel_section.nbcl" as datetime_widg { * } +import "nbcl/panel/panel_section.nbcl" as panel_section { * } component EwwiiPanel () { Box { @@ -10,17 +10,8 @@ component EwwiiPanel () { width = config.panel_width space_evenly = true - PanelSection "section_left" { - section_side = "left" - widg_align = "start" - } - PanelSection "section_left" { - section_side = "center" - widg_align = "center" - } - PanelSection "section_left" { - section_side = "right" - widg_align = "end" - } + panel_section.panel_section("left", "start") + panel_section.panel_section("center", "center") + panel_section.panel_section("right", "end") } } \ No newline at end of file diff --git a/nbcl/panel/panel_section.nbcl b/nbcl/panel/panel_section.nbcl index 19f9386..9da048b 100644 --- a/nbcl/panel/panel_section.nbcl +++ b/nbcl/panel/panel_section.nbcl @@ -1,4 +1,5 @@ # 3 Sections of the panel + component PanelSection (section_side, widg_align) { Box { orinetation = "horizontal" @@ -16,4 +17,11 @@ component PanelSection (section_side, widg_align) { width = "100%" } } +} + +fn panel_section(section_side, widg_align) { + PanelSection "section_${section_side}" { + section_side = section_side + widg_align = widg_align + } } \ No newline at end of file