Files
metabuilder/packages/dashboard/seed/scripts/layout/flex.lua
JohnDoe6345789 bf1401fe34 Enhance module definitions and add type annotations across various packages
- Added type annotations and class definitions in the dashboard layout, stats, and data table modules for improved type safety and documentation.
- Introduced new classes for UI components, props, and configuration in the form builder, navigation menu, notification center, and UI dialogs packages.
- Implemented detailed type definitions for actions, fields, and pagination components to streamline usage and enhance clarity.
- Updated initialization functions in multiple packages to include versioning and installation context.
- Improved structure and readability of the codebase by organizing and documenting component properties and methods.
2025-12-30 10:21:33 +00:00

23 lines
555 B
Lua

-- Dashboard flex layout
---@class FlexLayoutConfig
---@field type string
---@field direction string
---@field gap number
---@field align string
---@param direction? string Direction of flex layout (default: "row")
---@param gap? number Gap between items in pixels (default: 16)
---@param align? string Alignment of items (default: "stretch")
---@return FlexLayoutConfig
local function flex(direction, gap, align)
return {
type = "flex",
direction = direction or "row",
gap = gap or 16,
align = align or "stretch"
}
end
return flex