-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathbox.lua
More file actions
26 lines (23 loc) · 603 Bytes
/
box.lua
File metadata and controls
26 lines (23 loc) · 603 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
local Component = require("nui-components.component")
local fn = require("nui-components.utils.fn")
---@class NuiComponents.Box: NuiComponents.Component
---@overload fun(_, props: table<string, any>, popup_options: NuiPopupOptions): NuiComponents.Box
---@field super NuiComponents.Component
local Box = Component:extend("Box")
function Box:init(props, popup_options)
Box.super.init(
self,
fn.merge(
{
size = 1,
},
fn.merge(props, {
is_focusable = false,
})
),
fn.deep_merge({
focusable = false,
}, popup_options)
)
end
return Box