Skip to content

Commit c8de233

Browse files
committed
docs(layout): update example for box nesting
1 parent 6f94063 commit c8de233

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lua/nui/layout/README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ handling the calculation for position and size of other components.
99
local Layout = require("nui.layout")
1010
local Popup = require("nui.popup")
1111

12-
local top_popup = Popup({ border = "single" })
13-
local bottom_popup = Popup({ border = "double" })
12+
local top_popup = Popup({ border = "double" })
13+
local bottom_left_popup = Popup({ border = "single" })
14+
local bottom_right_popup = Popup({ border = "single" })
1415

1516
local layout = Layout(
1617
{
@@ -22,7 +23,10 @@ local layout = Layout(
2223
},
2324
Layout.Box({
2425
Layout.Box(top_popup, { size = "40%" }),
25-
Layout.Box(bottom_popup, { size = "60%" }),
26+
Layout.Box({
27+
Layout.Box(bottom_left_popup, { size = "50%" }),
28+
Layout.Box(bottom_right_popup, { size = "50%" }),
29+
}, { dir = "row", size = "60%" }),
2630
}, { dir = "col" })
2731
)
2832

0 commit comments

Comments
 (0)