mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-05-04 02:34:52 +00:00
26 lines
605 B
Lua
26 lines
605 B
Lua
-- Dashboard stat card component
|
|
|
|
---@class StatCardConfig
|
|
---@field type string
|
|
---@field title string
|
|
---@field value string|number
|
|
---@field icon? string
|
|
---@field trend? table
|
|
|
|
---@param title string Card title
|
|
---@param value string|number Card value to display
|
|
---@param icon? string Optional icon identifier
|
|
---@param trend? table Optional trend indicator data
|
|
---@return StatCardConfig
|
|
local function stat_card(title, value, icon, trend)
|
|
return {
|
|
type = "stat_card",
|
|
title = title,
|
|
value = value,
|
|
icon = icon,
|
|
trend = trend
|
|
}
|
|
end
|
|
|
|
return stat_card
|